X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport-gre.c;h=24c53f89680d4b46ee85f180fe8d197e692b3c88;hb=e7ed3a3a5f87d20f0cc632ae23adba6f30a4e19d;hp=0f45f8f705027bf2239045df62eb900c7391c99c;hpb=f915f1a8ca180828983ef22cf2fd21b8f010b972;p=openvswitch diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c index 0f45f8f7..24c53f89 100644 --- a/datapath/vport-gre.c +++ b/datapath/vport-gre.c @@ -103,9 +103,12 @@ static struct sk_buff *gre_update_header(const struct vport *vport, 0)); /* * Allow our local IP stack to fragment the outer packet even if the - * DF bit is set as a last resort. + * DF bit is set as a last resort. We also need to force selection of + * an IP ID here because Linux will otherwise leave it at 0 if the + * packet originally had DF set. */ skb->local_df = 1; + __ip_select_ident(ip_hdr(skb), dst, 0); return skb; } @@ -342,7 +345,7 @@ static int gre_rcv(struct sk_buff *skb) __skb_pull(skb, hdr_len); skb_postpull_rcsum(skb, skb_transport_header(skb), hdr_len + ETH_HLEN); - tnl_rcv(vport, skb); + tnl_rcv(vport, skb, iph->tos); return 0; error: @@ -385,7 +388,7 @@ static void gre_exit(void) } const struct vport_ops gre_vport_ops = { - .type = ODP_VPORT_TYPE_GRE, + .type = OVS_VPORT_TYPE_GRE, .flags = VPORT_F_GEN_STATS | VPORT_F_TUN_ID, .init = gre_init, .exit = gre_exit,