Commit:     13b0e83b5b52d1a0ab87772ecc93fe91b2740386
Parent:     17b0d7ef658583842da75eebf8001dc617f0b52e
Author:     Jan Engelhardt <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 14 23:41:34 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:02:24 2008 -0800

    [NETFILTER]: xt_pkttype: Add explicit check for IPv4
    In the PACKET_LOOPBACK case, the skb data was always interpreted as
    IPv4, but that is not valid for IPv6, obviously. Fix this by adding an
    extra condition to check for AF_INET.
    Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/netfilter/xt_pkttype.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c
index 2762449..080f324 100644
--- a/net/netfilter/xt_pkttype.c
+++ b/net/netfilter/xt_pkttype.c
@@ -31,7 +31,8 @@ pkttype_mt(const struct sk_buff *skb, const struct net_device 
        const struct xt_pkttype_info *info = matchinfo;
        if (skb->pkt_type == PACKET_LOOPBACK)
-               type = ipv4_is_multicast(ip_hdr(skb)->daddr)
+               type = match->family == AF_INET &&
+                      ipv4_is_multicast(ip_hdr(skb)->daddr)
                        ? PACKET_MULTICAST
                        : PACKET_BROADCAST;
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