Skip to contentSkip to conversation

linux-next: manual merge of the netfilter-next tree with the net tree

PATCH Stephen Rothwell 2 participants 3 messages Sep 13, 2016 – Sep 30, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the netfilter-next tree got a conflict in:

net/netfilter/nf_tables_netdev.c

between commit:

c73c24849011 ("netfilter: nf_tables_netdev: remove redundant ip_hdr assignment")

from the net tree and commit:

ddc8b6027ad0 ("netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()")

from the netfilter-next tree.

I fixed it up (I used the latter version of this file and applied the patch below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <[email protected]>
Date: Tue, 13 Sep 2016 10:08:58 +1000
Subject: [PATCH] netfilter: merge fixup for "nf_tables_netdev: remove
redundant ip_hdr assignment"

---
 include/net/netfilter/nf_tables_ipv4.h | 1 -
 1 file changed, 1 deletion(-)
include/net/netfilter/nf_tables_ipv4.h +0 -1
index 968f00b82fb5..25e33aee91e7 100644
@@ -33,7 +33,6 @@ __nft_set_pktinfo_ipv4_validate(struct nft_pktinfo *pkt,
 	if (!iph)
 		return -1;
 
-	iph = ip_hdr(skb);
 	if (iph->ihl < 5 || iph->version != 4)
 		return -1;
 
Signature · 5 lines
2.8.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 46 lines · On Tue, 13 Sep 2016 10:12:50 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the netfilter-next tree got a conflict in:

net/netfilter/nf_tables_netdev.c

between commit:

c73c24849011 ("netfilter: nf_tables_netdev: remove redundant ip_hdr assignment")

from the net tree and commit:

ddc8b6027ad0 ("netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()")

from the netfilter-next tree.

I fixed it up (I used the latter version of this file and applied the patch below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <[email protected]>
Date: Tue, 13 Sep 2016 10:08:58 +1000
Subject: [PATCH] netfilter: merge fixup for "nf_tables_netdev: remove
redundant ip_hdr assignment"

---
 include/net/netfilter/nf_tables_ipv4.h | 1 -
 1 file changed, 1 deletion(-)
include/net/netfilter/nf_tables_ipv4.h +0 -1
index 968f00b82fb5..25e33aee91e7 100644
@@ -33,7 +33,6 @@ __nft_set_pktinfo_ipv4_validate(struct nft_pktinfo *pkt,
 	if (!iph)
 		return -1;
 
-	iph = ip_hdr(skb);
 	if (iph->ihl < 5 || iph->version != 4)
 		return -1;
 
Signature · 1 line
2.8.1

The above merge fix patch is now needed when the net-next tree is merged with Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw

[ remove other unrelated dev groups ]

Hi pablo,

2016-09-29 9:20 GMT+08:00 Stephen Rothwell <[email protected]>:

Quoted 31 lines

Hi all,

Quoted 28 lines · On Tue, 13 Sep 2016 10:12:50 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the netfilter-next tree got a conflict in:

net/netfilter/nf_tables_netdev.c

between commit:

c73c24849011 ("netfilter: nf_tables_netdev: remove redundant ip_hdr assignment")

from the net tree and commit:

ddc8b6027ad0 ("netfilter: introduce nft_set_pktinfo_{ipv4, ipv6}_validate()")

 include/net/netfilter/nf_tables_ipv4.h | 1 -
 1 file changed, 1 deletion(-)
include/net/netfilter/nf_tables_ipv4.h +0 -1
index 968f00b82fb5..25e33aee91e7 100644
@@ -33,7 +33,6 @@ __nft_set_pktinfo_ipv4_validate(struct nft_pktinfo *pkt,
      if (!iph)
              return -1;
 
-     iph = ip_hdr(skb);
      if (iph->ihl < 5 || iph->version != 4)
              return -1;
 
Quoted 6 lines
Quoted 2 lines

--
2.8.1

The above merge fix patch is now needed when the net-next tree is merged with Linus' tree.

I think this merge conflict was fixed in your nf-next tree by commit f20fbc0717f9.

But this redundant statement "iph = ip_hdr(skb);" should be removed, we already use skb_header_pointer to get ip header pointer before.

See function __nft_set_pktinfo_ipv4_validate():

{
    struct iphdr *iph, _iph;
    u32 len, thoff;

    iph = skb_header_pointer(skb, ....);
    ^^^^^^^^^^^^^^^^^^^^^^^^^
    if (!iph)
         return -1;

     iph = ip_hdr(skb);
     ^^^^^^^^^^^^^^^^^
     if (iph->ihl < 5 || iph->version != 4)
     ....
Quoted 3 lines

--
Cheers,
Stephen Rothwell