X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport-gre.c;h=8775d38c54dc16d14a2a67caa79cf33c444072e5;hb=0e70cdcb8ddeb20417e682fd63769f9d16601b07;hp=9c1c1cc825388ed64229f28058f338077c21d20f;hpb=aae369c706cd56886f8560c43960110f79e062dc;p=openvswitch diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c index 9c1c1cc8..8775d38c 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; } @@ -204,7 +207,7 @@ static void gre_err(struct sk_buff *skb, u32 info) * out key as if it were the in key and then check to see if the input * and output keys are the same. */ - if (mutable->in_key != mutable->out_key) + if (mutable->key.in_key != mutable->out_key) return; if (!!(mutable->flags & TNL_F_IN_KEY_MATCH) != @@ -385,8 +388,8 @@ static void gre_exit(void) } const struct vport_ops gre_vport_ops = { - .type = ODP_VPORT_TYPE_GRE, - .flags = VPORT_F_GEN_STATS | VPORT_F_TUN_ID, + .type = OVS_VPORT_TYPE_GRE, + .flags = VPORT_F_TUN_ID, .init = gre_init, .exit = gre_exit, .create = gre_create,