]> err.no Git - linux-2.6/blobdiff - net/bridge/netfilter/ebt_snat.c
tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup
[linux-2.6] / net / bridge / netfilter / ebt_snat.c
index 6bc263c589812fb0f1620ca22b2dd804080255ca..5425333dda03b82c3307078a0fae3486cf310d75 100644 (file)
@@ -22,8 +22,8 @@ static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
 {
        const struct ebt_nat_info *info = data;
 
-       if (skb_make_writable(skb, 0))
-               return NF_DROP;
+       if (!skb_make_writable(skb, 0))
+               return EBT_DROP;
 
        memcpy(eth_hdr(skb)->h_source, info->mac, ETH_ALEN);
        if (!(info->target & NAT_ARP_BIT) &&
@@ -68,8 +68,7 @@ static int ebt_target_snat_check(const char *tablename, unsigned int hookmask,
        return 0;
 }
 
-static struct ebt_target snat =
-{
+static struct ebt_target snat __read_mostly = {
        .name           = EBT_SNAT_TARGET,
        .target         = ebt_target_snat,
        .check          = ebt_target_snat_check,
@@ -88,4 +87,5 @@ static void __exit ebt_snat_fini(void)
 
 module_init(ebt_snat_init);
 module_exit(ebt_snat_fini);
+MODULE_DESCRIPTION("Ebtables: Source MAC address translation");
 MODULE_LICENSE("GPL");