net: bridge: make the orig_iface info available
The per-packet orig_iface information is available when CONFIG_NET_ROUTING is set. It is pretty useful to have it available with CONFIG_NET_ETHERNET_BRIDGE as well. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
ffce28ad6f
commit
61c300f92c
1 changed files with 3 additions and 3 deletions
|
@ -86,7 +86,7 @@ struct net_pkt {
|
||||||
|
|
||||||
/** @cond ignore */
|
/** @cond ignore */
|
||||||
|
|
||||||
#if defined(CONFIG_NET_ROUTING)
|
#if defined(CONFIG_NET_ROUTING) || defined(CONFIG_NET_ETHERNET_BRIDGE)
|
||||||
struct net_if *orig_iface; /* Original network interface */
|
struct net_if *orig_iface; /* Original network interface */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ static inline void net_pkt_set_iface(struct net_pkt *pkt, struct net_if *iface)
|
||||||
|
|
||||||
static inline struct net_if *net_pkt_orig_iface(struct net_pkt *pkt)
|
static inline struct net_if *net_pkt_orig_iface(struct net_pkt *pkt)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_NET_ROUTING)
|
#if defined(CONFIG_NET_ROUTING) || defined(CONFIG_NET_ETHERNET_BRIDGE)
|
||||||
return pkt->orig_iface;
|
return pkt->orig_iface;
|
||||||
#else
|
#else
|
||||||
return pkt->iface;
|
return pkt->iface;
|
||||||
|
@ -321,7 +321,7 @@ static inline struct net_if *net_pkt_orig_iface(struct net_pkt *pkt)
|
||||||
static inline void net_pkt_set_orig_iface(struct net_pkt *pkt,
|
static inline void net_pkt_set_orig_iface(struct net_pkt *pkt,
|
||||||
struct net_if *iface)
|
struct net_if *iface)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_NET_ROUTING)
|
#if defined(CONFIG_NET_ROUTING) || defined(CONFIG_NET_ETHERNET_BRIDGE)
|
||||||
pkt->orig_iface = iface;
|
pkt->orig_iface = iface;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue