diff mbox series

[net] sit: update frag_off info

Message ID 1512009674-1724-1-git-send-email-liuhangbin@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net] sit: update frag_off info | expand

Commit Message

Hangbin Liu Nov. 30, 2017, 2:41 a.m. UTC
After parsing the sit netlink change info, we forget to update frag_off in
ipip6_tunnel_update(). Fix it by assigning frag_off with new value.

Fixes: f37234160233 ("sit: add support of link creation via rtnl")
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 net/ipv6/sit.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nicolas Dichtel Nov. 30, 2017, 2:08 p.m. UTC | #1
Le 30/11/2017 à 03:41, Hangbin Liu a écrit :
> After parsing the sit netlink change info, we forget to update frag_off in
> ipip6_tunnel_update(). Fix it by assigning frag_off with new value.
> 
> Fixes: f37234160233 ("sit: add support of link creation via rtnl")
I think it's older than this patch (before git ages), but it probably doesn't
matter.


> Reported-by: Jianlin Shi <jishi@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Hangbin Liu Nov. 30, 2017, 2:35 p.m. UTC | #2
On Thu, Nov 30, 2017 at 03:08:51PM +0100, Nicolas Dichtel wrote:
> Le 30/11/2017 à 03:41, Hangbin Liu a écrit :
> > After parsing the sit netlink change info, we forget to update frag_off in
> > ipip6_tunnel_update(). Fix it by assigning frag_off with new value.
> > 
> > Fixes: f37234160233 ("sit: add support of link creation via rtnl")
> I think it's older than this patch (before git ages), but it probably doesn't
> matter.

Yeah..It really took me some time to consider whether add the fixes tag or
not. David, please feel free to remove it if you think it's unnecessary.

Thanks
Hangbin
> 
> 
> > Reported-by: Jianlin Shi <jishi@redhat.com>
> > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
David Miller Nov. 30, 2017, 3:26 p.m. UTC | #3
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Thu, 30 Nov 2017 10:41:14 +0800

> After parsing the sit netlink change info, we forget to update frag_off in
> ipip6_tunnel_update(). Fix it by assigning frag_off with new value.
> 
> Fixes: f37234160233 ("sit: add support of link creation via rtnl")
> Reported-by: Jianlin Shi <jishi@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Since, as mentioned, this bug existed before netlink sit support, I've
removed this Fixes tag.

Applied and queued up for -stable, nice catch.
diff mbox series

Patch

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index d60ddcb..d7dc23c 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1098,6 +1098,7 @@  static void ipip6_tunnel_update(struct ip_tunnel *t, struct ip_tunnel_parm *p,
 	ipip6_tunnel_link(sitn, t);
 	t->parms.iph.ttl = p->iph.ttl;
 	t->parms.iph.tos = p->iph.tos;
+	t->parms.iph.frag_off = p->iph.frag_off;
 	if (t->parms.link != p->link || t->fwmark != fwmark) {
 		t->parms.link = p->link;
 		t->fwmark = fwmark;