diff --git a/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch b/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch index b576ad91b6..5cc7dabad7 100644 --- a/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch +++ b/target/linux/generic/hack-4.9/951-bridge-Add-new-bridge-APIs-needed-for-network-HW-acc.patch @@ -24,6 +24,8 @@ Signed-off-by: Murat Sezgin net/bridge/br_if.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) +diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h +index 0911c8c..4473f62 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -52,6 +52,7 @@ struct br_ip_list { @@ -34,9 +36,11 @@ Signed-off-by: Murat Sezgin typedef int br_should_route_hook_t(struct sk_buff *skb); extern br_should_route_hook_t __rcu *br_should_route_hook; +diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c +index ed0dd33..342b2d9 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c -@@ -654,3 +654,28 @@ void br_port_flags_change(struct net_bri +@@ -655,3 +655,28 @@ void br_port_flags_change(struct net_bridge_port *p, unsigned long mask) if (mask & BR_AUTO_MASK) nbp_update_port_count(br); } @@ -65,3 +69,6 @@ Signed-off-by: Murat Sezgin + u64_stats_update_end(&stats->syncp); +} +EXPORT_SYMBOL_GPL(br_dev_update_stats); +-- +2.7.4 + diff --git a/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch b/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch index 1ad4ad2ea5..a898c4a695 100644 --- a/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch +++ b/target/linux/generic/hack-4.9/952-net-conntrack-events-support-multiple-registrant.patch @@ -20,6 +20,8 @@ Signed-off-by: Zhi Chen net/netfilter/nf_conntrack_netlink.c | 19 ++++++ 6 files changed, 139 insertions(+), 1 deletion(-) +diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h +index 12d967b..c2b98b6 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h @@ -70,6 +70,10 @@ struct nf_ct_event { @@ -33,7 +35,7 @@ Signed-off-by: Zhi Chen struct nf_ct_event_notifier { int (*fcn)(unsigned int events, struct nf_ct_event *item); }; -@@ -78,6 +82,7 @@ int nf_conntrack_register_notifier(struc +@@ -78,6 +82,7 @@ int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *nb); void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb); @@ -41,7 +43,7 @@ Signed-off-by: Zhi Chen void nf_ct_deliver_cached_events(struct nf_conn *ct); int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, -@@ -86,11 +91,13 @@ int nf_conntrack_eventmask_report(unsign +@@ -86,11 +91,13 @@ int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) { @@ -69,7 +71,7 @@ Signed-off-by: Zhi Chen return nf_conntrack_eventmask_report(1 << event, ct, portid, report); } -@@ -114,10 +123,12 @@ nf_conntrack_event_report(enum ip_conntr +@@ -114,10 +123,12 @@ nf_conntrack_event_report(enum ip_conntrack_events event, struct nf_conn *ct, static inline int nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct) { @@ -82,6 +84,8 @@ Signed-off-by: Zhi Chen return nf_conntrack_eventmask_report(1 << event, ct, 0, 0); } +diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h +index e469e85..1d31db8 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h @@ -86,7 +86,11 @@ struct netns_ct { @@ -96,6 +100,8 @@ Signed-off-by: Zhi Chen struct nf_exp_event_notifier __rcu *nf_expect_event_cb; struct nf_ip_net nf_ct_proto; #if defined(CONFIG_NF_CONNTRACK_LABELS) +diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig +index 63073be..08d7aab 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -136,6 +136,14 @@ config NF_CONNTRACK_TIMEOUT @@ -113,9 +119,11 @@ Signed-off-by: Zhi Chen config NF_CONNTRACK_TIMESTAMP bool 'Connection tracking timestamping' depends on NETFILTER_ADVANCED +diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c +index 6bd1508..9b81c7c 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -2077,6 +2077,10 @@ int nf_conntrack_init_net(struct net *ne +@@ -1998,6 +1998,10 @@ int nf_conntrack_init_net(struct net *net) ret = nf_conntrack_proto_pernet_init(net); if (ret < 0) goto err_proto; @@ -126,6 +134,8 @@ Signed-off-by: Zhi Chen return 0; err_proto: +diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c +index da9df2d..e0e2a8f 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c @@ -18,6 +18,9 @@ @@ -138,7 +148,7 @@ Signed-off-by: Zhi Chen #include #include #include -@@ -117,6 +120,38 @@ static void ecache_work(struct work_stru +@@ -117,6 +120,38 @@ static void ecache_work(struct work_struct *work) schedule_delayed_work(&ctnet->ecache_dwork, delay); } @@ -177,7 +187,7 @@ Signed-off-by: Zhi Chen int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, u32 portid, int report) { -@@ -171,10 +206,52 @@ out_unlock: +@@ -171,10 +206,52 @@ int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct, rcu_read_unlock(); return ret; } @@ -230,7 +240,7 @@ Signed-off-by: Zhi Chen void nf_ct_deliver_cached_events(struct nf_conn *ct) { struct net *net = nf_ct_net(ct); -@@ -225,6 +302,7 @@ void nf_ct_deliver_cached_events(struct +@@ -225,6 +302,7 @@ void nf_ct_deliver_cached_events(struct nf_conn *ct) out_unlock: rcu_read_unlock(); } @@ -238,7 +248,7 @@ Signed-off-by: Zhi Chen EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events); void nf_ct_expect_event_report(enum ip_conntrack_expect_events event, -@@ -257,6 +335,12 @@ out_unlock: +@@ -257,6 +335,12 @@ void nf_ct_expect_event_report(enum ip_conntrack_expect_events event, rcu_read_unlock(); } @@ -251,7 +261,7 @@ Signed-off-by: Zhi Chen int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *new) { -@@ -277,8 +361,15 @@ out_unlock: +@@ -277,8 +361,15 @@ int nf_conntrack_register_notifier(struct net *net, mutex_unlock(&nf_ct_ecache_mutex); return ret; } @@ -267,14 +277,16 @@ Signed-off-by: Zhi Chen void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *new) { -@@ -292,6 +383,7 @@ void nf_conntrack_unregister_notifier(st +@@ -291,6 +382,7 @@ void nf_conntrack_unregister_notifier(struct net *net, + RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, NULL); mutex_unlock(&nf_ct_ecache_mutex); - /* synchronize_rcu() is called from ctnetlink_exit. */ } +#endif EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier); int nf_ct_expect_register_notifier(struct net *net, +diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c +index 04111c1..8c741f7 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -28,6 +28,11 @@ @@ -287,9 +299,9 @@ Signed-off-by: Zhi Chen +#endif + #include - #include -@@ -618,14 +623,22 @@ static size_t ctnetlink_nlmsg_size(const + #include +@@ -615,14 +620,22 @@ static size_t ctnetlink_nlmsg_size(const struct nf_conn *ct) ; } @@ -312,7 +324,7 @@ Signed-off-by: Zhi Chen struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; -@@ -3288,9 +3301,15 @@ static int ctnetlink_stat_exp_cpu(struct +@@ -3260,9 +3273,15 @@ static int ctnetlink_stat_exp_cpu(struct net *net, struct sock *ctnl, } #ifdef CONFIG_NF_CONNTRACK_EVENTS @@ -328,3 +340,6 @@ Signed-off-by: Zhi Chen static struct nf_exp_event_notifier ctnl_notifier_exp = { .fcn = ctnetlink_expect_event, +-- +2.7.4 +