Commit 46c0772d authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

net: bridge: minor style adjustments in br_handle_frame_finish

Trivial style changes in br_handle_frame_finish.
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c380d37e
...@@ -131,11 +131,11 @@ static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br, ...@@ -131,11 +131,11 @@ static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br,
/* note: already called with rcu_read_lock */ /* note: already called with rcu_read_lock */
int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb) int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
{ {
const unsigned char *dest = eth_hdr(skb)->h_dest;
struct net_bridge_port *p = br_port_get_rcu(skb->dev); struct net_bridge_port *p = br_port_get_rcu(skb->dev);
struct net_bridge *br; const unsigned char *dest = eth_hdr(skb)->h_dest;
struct net_bridge_fdb_entry *dst; struct net_bridge_fdb_entry *dst = NULL;
struct net_bridge_mdb_entry *mdst; struct net_bridge_mdb_entry *mdst;
struct net_bridge *br;
struct sk_buff *skb2; struct sk_buff *skb2;
bool unicast = true; bool unicast = true;
u16 vid = 0; u16 vid = 0;
...@@ -166,8 +166,6 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb ...@@ -166,8 +166,6 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
if (br->dev->flags & IFF_PROMISC) if (br->dev->flags & IFF_PROMISC)
skb2 = skb; skb2 = skb;
dst = NULL;
if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP)) if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
br_do_proxy_arp(skb, br, vid, p); br_do_proxy_arp(skb, br, vid, p);
...@@ -185,13 +183,12 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb ...@@ -185,13 +183,12 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
skb = NULL; skb = NULL;
if (!skb2) if (!skb2)
goto out; goto out;
} else } else {
skb2 = skb; skb2 = skb;
}
unicast = false; unicast = false;
br->dev->stats.multicast++; br->dev->stats.multicast++;
} else if ((dst = __br_fdb_get(br, dest, vid)) && } else if ((dst = __br_fdb_get(br, dest, vid)) && dst->is_local) {
dst->is_local) {
skb2 = skb; skb2 = skb;
/* Do not forward the packet since it's local. */ /* Do not forward the packet since it's local. */
skb = NULL; skb = NULL;
...@@ -201,9 +198,10 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb ...@@ -201,9 +198,10 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
if (dst) { if (dst) {
dst->used = jiffies; dst->used = jiffies;
br_forward(dst->dst, skb, skb2); br_forward(dst->dst, skb, skb2);
} else } else {
br_flood_forward(br, skb, skb2, unicast); br_flood_forward(br, skb, skb2, unicast);
} }
}
if (skb2) if (skb2)
return br_pass_frame_up(skb2); return br_pass_frame_up(skb2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment