Skip to content

Commit c3d7a08

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Spurious warning when loading rules using the physdev match, from Todd Seidelmann. 2) Fix FTP conntrack helper debugging output, from Thomas Jarosch. 3) Restore per-netns nf_conntrack_{acct,helper,timeout} sysctl knobs, from Florian Westphal. 4) Clear skbuff timestamp from the flowtable datapath, also from Florian. 5) Fix incorrect byteorder of NFT_META_BRI_IIFVPROTO, from wenxu. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 94880a5 + daf1de9 commit c3d7a08

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

net/bridge/netfilter/nft_meta_bridge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void nft_meta_bridge_get_eval(const struct nft_expr *expr,
5353
goto err;
5454

5555
br_vlan_get_proto(br_dev, &p_proto);
56-
nft_reg_store16(dest, p_proto);
56+
nft_reg_store16(dest, htons(p_proto));
5757
return;
5858
}
5959
default:

net/netfilter/nf_conntrack_ftp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int find_pattern(const char *data, size_t dlen,
322322
i++;
323323
}
324324

325-
pr_debug("Skipped up to `%c'!\n", skip);
325+
pr_debug("Skipped up to 0x%hhx delimiter!\n", skip);
326326

327327
*numoff = i;
328328
*numlen = getnum(data + i, dlen - i, cmd, term, numoff);

net/netfilter/nf_conntrack_standalone.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,13 @@ static int nf_conntrack_standalone_init_sysctl(struct net *net)
10371037
table[NF_SYSCTL_CT_COUNT].data = &net->ct.count;
10381038
table[NF_SYSCTL_CT_CHECKSUM].data = &net->ct.sysctl_checksum;
10391039
table[NF_SYSCTL_CT_LOG_INVALID].data = &net->ct.sysctl_log_invalid;
1040+
table[NF_SYSCTL_CT_ACCT].data = &net->ct.sysctl_acct;
1041+
table[NF_SYSCTL_CT_HELPER].data = &net->ct.sysctl_auto_assign_helper;
10401042
#ifdef CONFIG_NF_CONNTRACK_EVENTS
10411043
table[NF_SYSCTL_CT_EVENTS].data = &net->ct.sysctl_events;
1044+
#endif
1045+
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
1046+
table[NF_SYSCTL_CT_TIMESTAMP].data = &net->ct.sysctl_tstamp;
10421047
#endif
10431048
table[NF_SYSCTL_CT_PROTO_TIMEOUT_GENERIC].data = &nf_generic_pernet(net)->timeout;
10441049
table[NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP].data = &nf_icmp_pernet(net)->timeout;

net/netfilter/nf_flow_table_ip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
228228
{
229229
skb_orphan(skb);
230230
skb_dst_set_noref(skb, dst);
231-
skb->tstamp = 0;
232231
dst_output(state->net, state->sk, skb);
233232
return NF_STOLEN;
234233
}
@@ -284,6 +283,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
284283
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
285284
iph = ip_hdr(skb);
286285
ip_decrease_ttl(iph);
286+
skb->tstamp = 0;
287287

288288
if (unlikely(dst_xfrm(&rt->dst))) {
289289
memset(skb->cb, 0, sizeof(struct inet_skb_parm));
@@ -512,6 +512,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
512512
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
513513
ip6h = ipv6_hdr(skb);
514514
ip6h->hop_limit--;
515+
skb->tstamp = 0;
515516

516517
if (unlikely(dst_xfrm(&rt->dst))) {
517518
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));

net/netfilter/xt_physdev.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,9 @@ static int physdev_mt_check(const struct xt_mtchk_param *par)
101101
if (info->bitmask & (XT_PHYSDEV_OP_OUT | XT_PHYSDEV_OP_ISOUT) &&
102102
(!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
103103
info->invert & XT_PHYSDEV_OP_BRIDGED) &&
104-
par->hook_mask & ((1 << NF_INET_LOCAL_OUT) |
105-
(1 << NF_INET_FORWARD) | (1 << NF_INET_POST_ROUTING))) {
104+
par->hook_mask & (1 << NF_INET_LOCAL_OUT)) {
106105
pr_info_ratelimited("--physdev-out and --physdev-is-out only supported in the FORWARD and POSTROUTING chains with bridged traffic\n");
107-
if (par->hook_mask & (1 << NF_INET_LOCAL_OUT))
108-
return -EINVAL;
106+
return -EINVAL;
109107
}
110108

111109
if (!brnf_probed) {

0 commit comments

Comments
 (0)