bridge: make br_parse_ip_options static
Subsystems (4)
PATCH 1/1 bridge: make br_parse_ip_options static
net/bridge/br_netfilter.c +1 -1
@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot* expected format */ -int br_parse_ip_options (struct sk_buff *skb) +static int br_parse_ip_options (struct sk_buff *skb) {struct ip_options *opt;struct iphdr *iph;
Quoted 7 lines · Stephen Hemminger
Signed-off-by Stephen Hemminger <[email protected]>
net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219
Quoted 8 lines
net/bridge/br_netfilter.c +1
-1@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot* expected format */ -int br_parse_ip_options (struct sk_buff *skb) +static int br_parse_ip_options (struct sk_buff *skb) {struct ip_options *opt;struct iphdr *iph;
My main motivation behind not making this static was that there would be possibly other places in the bridge code (besides br_netfilter.c) where we enter the IP stack and might want to call this. Not sure if it's indeed the case though..
Signature · 1 line
Bandan
Quoted 10 lines · On Tue, 19 Oct 2010 07:22:34 -0400 Bandan Das <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger
Signed-off-by Stephen Hemminger <[email protected]>net/bridge/br_netfilter.c +0
-0@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot* expected format */
Quoted 12 lines
net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219
Quoted 6 lines
net/bridge/br_netfilter.c +1
-1-int br_parse_ip_options (struct sk_buff *skb) +static int br_parse_ip_options (struct sk_buff *skb) {struct ip_options *opt;struct iphdr *iph;My main motivation behind not making this static was that there would be possibly other places in the bridge code (besides
br_netfilter.c) where we enter the IP stack and might want to call this. Not sure if it's indeed the case though..
I checked by doing make allmodconfig as well as looking by git grep 'br_parse_ip_options'
Quoted 11 lines
Quoted 6 lines
My main motivation behind not making this static was that there would be possibly other places in the bridge code (besides
br_netfilter.c) where we enter the IP stack and might want to call this. Not sure if it's indeed the case though..I checked by doing make allmodconfig as well as looking by git grep '
br_parse_ip_options'
Sorry, my wording was misleading :) What I meant was at this time, it's only used in br_netfilter.c but may be sometime in the future, it could possible be used in some other places where we enter the IP stack from the bridge code.
But, I completely agree with you. It makes more sense to make it static as of now.
Bandan
David Miller
maintainerFrom: Bandan Das <[email protected]>
Date: Tue, 19 Oct 2010 07:22:34 -0400
Quoted 10 lines · Stephen Hemminger
Quoted 9 lines
Signed-off-by Stephen Hemminger <[email protected]>net/bridge/br_netfilter.c +0
-0@@ -213,7 +213,7 @@ static inline void nf_bridge_update_prot* expected format */
Quoted 11 lines
net/bridge/br_netfilter.c static inline void nf_bridge_update_prot · line 219
Quoted 6 lines
net/bridge/br_netfilter.c +1
-1-int br_parse_ip_options (struct sk_buff *skb) +static int br_parse_ip_options (struct sk_buff *skb) {struct ip_options *opt;struct iphdr *iph;My main motivation behind not making this static was that there would be possibly other places in the bridge code (besides
br_netfilter.c) where we enter the IP stack and might want to call this. Not sure if it's indeed the case though..
You can un-static it when the use is added.
Patch applied, thanks Stephen.