Skip to content

Commit bf7a4dd

Browse files
Guillaume NaultNipaLocal
authored andcommitted
tunnels: Accept PACKET_HOST in skb_tunnel_check_pmtu().
Because skb_tunnel_check_pmtu() doesn't handle PACKET_HOST packets, commit 30a92c9 ("openvswitch: Set the skbuff pkt_type for proper pmtud support.") forced skb->pkt_type to PACKET_OUTGOING for openvswitch packets that are sent using the OVS_ACTION_ATTR_OUTPUT action. This allowed such packets to invoke the iptunnel_pmtud_check_icmp() or iptunnel_pmtud_check_icmpv6() helpers and thus trigger PMTU update on the input device. However, this also broke other parts of PMTU discovery. Since these packets don't have the PACKET_HOST type anymore, they won't trigger the sending of ICMP Fragmentation Needed or Packet Too Big messages to remote hosts when oversized (see the skb_in->pkt_type condition in __icmp_send() for example). These two skb->pkt_type checks are therefore incompatible as one requires skb->pkt_type to be PACKET_HOST, while the other requires it to be anything but PACKET_HOST. It makes sense to not trigger ICMP messages for non-PACKET_HOST packets as these messages should be generated only for incoming l2-unicast packets. However there doesn't seem to be any reason for skb_tunnel_check_pmtu() to ignore PACKET_HOST packets. Allow both cases to work by allowing skb_tunnel_check_pmtu() to work on PACKET_HOST packets and not overriding skb->pkt_type in openvswitch anymore. Fixes: 30a92c9 ("openvswitch: Set the skbuff pkt_type for proper pmtud support.") Fixes: 4cb47a8 ("tunnels: PMTU discovery support for directly bridged IP packets") Signed-off-by: Guillaume Nault <[email protected]> Reviewed-by: Stefano Brivio <[email protected]> Reviewed-by: Aaron Conole <[email protected]> Tested-by: Aaron Conole <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent cd1a88c commit bf7a4dd

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

net/ipv4/ip_tunnel_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ int skb_tunnel_check_pmtu(struct sk_buff *skb, struct dst_entry *encap_dst,
416416

417417
skb_dst_update_pmtu_no_confirm(skb, mtu);
418418

419-
if (!reply || skb->pkt_type == PACKET_HOST)
419+
if (!reply)
420420
return 0;
421421

422422
if (skb->protocol == htons(ETH_P_IP))

net/openvswitch/actions.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -947,12 +947,6 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,
947947
pskb_trim(skb, ovs_mac_header_len(key));
948948
}
949949

950-
/* Need to set the pkt_type to involve the routing layer. The
951-
* packet movement through the OVS datapath doesn't generally
952-
* use routing, but this is needed for tunnel cases.
953-
*/
954-
skb->pkt_type = PACKET_OUTGOING;
955-
956950
if (likely(!mru ||
957951
(skb->len <= mru + vport->dev->hard_header_len))) {
958952
ovs_vport_send(vport, skb, ovs_key_mac_proto(key));

0 commit comments

Comments
 (0)