Commit:     bbdc176a2f39913063aaaf95bc27e4b18fd14953
Parent:     c9386cfddc11e331fa7c860cccaedc2ae8f459f8
Author:     Martin Josefsson <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 4 12:16:54 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 4 12:16:54 2007 -0800

    [NETFILTER]: nf_nat: fix MASQUERADE crash on device down
    Check the return value of nfct_nat() in device_cmp(), we might very well
    have non NAT conntrack entries as well (Netfilter bugzilla #528).
    Signed-off-by: Martin Josefsson <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/netfilter/ipt_MASQUERADE.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c 
index 28b9233..d669685 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -127,10 +127,13 @@ masquerade_target(struct sk_buff **pskb,
 static inline int
 device_cmp(struct ip_conntrack *i, void *ifindex)
+       int ret;
        struct nf_conn_nat *nat = nfct_nat(i);
+       if (!nat)
+               return 0;
-       int ret;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to