]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/netfilter/xt_TCPMSS.c
netfilter: nf_tables: fix oob access
[mirror_ubuntu-artful-kernel.git] / net / netfilter / xt_TCPMSS.c
index 872db2d0e2a9970642c50e933c0a2225f8dd4599..27241a767f17b4b27d24095a31e5e9a2d3e29ce4 100644 (file)
@@ -108,7 +108,7 @@ tcpmss_mangle_packet(struct sk_buff *skb,
                return -1;
 
        if (info->mss == XT_TCPMSS_CLAMP_PMTU) {
-               struct net *net = par->net;
+               struct net *net = xt_net(par);
                unsigned int in_mtu = tcpmss_reverse_mtu(net, skb, family);
                unsigned int min_mtu = min(dst_mtu(skb_dst(skb)), in_mtu);
 
@@ -172,7 +172,7 @@ tcpmss_mangle_packet(struct sk_buff *skb,
         * length IPv6 header of 60, ergo the default MSS value is 1220
         * Since no MSS was provided, we must use the default values
         */
-       if (par->family == NFPROTO_IPV4)
+       if (xt_family(par) == NFPROTO_IPV4)
                newmss = min(newmss, (u16)536);
        else
                newmss = min(newmss, (u16)1220);