Patchwork [net,3/3] netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper

login
register
mail settings
Submitter Julian Anastasov
Date Oct. 20, 2013, 12:43 p.m.
Message ID <1382272985-1528-4-git-send-email-ja@ssi.bg>
Download mbox | patch
Permalink /patch/284965/
State Accepted
Delegated to: David Miller
Headers show

Comments

Julian Anastasov - Oct. 20, 2013, 12:43 p.m.
Now when rt6_nexthop() can return nexthop address we can use it
for proper nexthop comparison of directly connected destinations.
For more information refer to commit bbb5823cf742a7
("netfilter: nf_conntrack: fix rt_gateway checks for H.323 helper").

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
 net/netfilter/nf_conntrack_h323_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Hannes Frederic Sowa - Oct. 21, 2013, 5:04 a.m.
On Sun, Oct 20, 2013 at 03:43:05PM +0300, Julian Anastasov wrote:
> Now when rt6_nexthop() can return nexthop address we can use it
> for proper nexthop comparison of directly connected destinations.
> For more information refer to commit bbb5823cf742a7
> ("netfilter: nf_conntrack: fix rt_gateway checks for H.323 helper").
> 
> Signed-off-by: Julian Anastasov <ja@ssi.bg>

Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Cool, that the bug is fixed and the code is a bit more simple. :)

Thanks,

  Hannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index bdebd03..70866d1 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -778,8 +778,8 @@  static int callforward_do_filter(const union nf_inet_addr *src,
 				   flowi6_to_flowi(&fl1), false)) {
 			if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
 					   flowi6_to_flowi(&fl2), false)) {
-				if (!memcmp(&rt1->rt6i_gateway, &rt2->rt6i_gateway,
-					    sizeof(rt1->rt6i_gateway)) &&
+				if (ipv6_addr_equal(rt6_nexthop(rt1),
+						    rt6_nexthop(rt2)) &&
 				    rt1->dst.dev == rt2->dst.dev)
 					ret = 1;
 				dst_release(&rt2->dst);