It allows applications running packet sockets over KNI interfaces to get
source Ethernet addresses of packets received using recvfrom function.

Signed-off-by: Igor Ryzhov <iryz...@nfware.com>
---
v2:
Use eth_header_parse instead of own implementation.
---
 kernel/linux/kni/kni_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index be9e6b0b9..ad8365877 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -744,6 +744,7 @@ kni_net_change_carrier(struct net_device *dev, bool 
new_carrier)
 
 static const struct header_ops kni_net_header_ops = {
        .create  = kni_net_header,
+       .parse   = eth_header_parse,
 #ifdef HAVE_REBUILD_HEADER
        .rebuild = kni_net_rebuild_header,
 #endif /* < 4.1.0  */
-- 
2.21.0

Reply via email to