From 8ce1fdea093c4f33c21ca6a42f8eb9cccac7441e Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 10 Apr 2019 13:30:03 +0300 Subject: [PATCH] kni: implement header_ops parse method 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 Acked-by: Ferruh Yigit --- 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 be9e6b0b9d..ad8365877c 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.20.1