kni: implement header_ops parse method
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 10 Apr 2019 10:30:03 +0000 (13:30 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 19 Apr 2019 10:35:28 +0000 (12:35 +0200)
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 <iryzhov@nfware.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
kernel/linux/kni/kni_net.c

index be9e6b0..ad83658 100644 (file)
@@ -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  */