]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: handle raw link
authorEric Leblond <eric@regit.org>
Wed, 9 Mar 2016 13:10:26 +0000 (14:10 +0100)
committerEric Leblond <eric@regit.org>
Wed, 9 Mar 2016 15:58:52 +0000 (16:58 +0100)
If no link layer header is reported then it is a raw header.

src/source-af-packet.c

index 212e118424d1e5e5dc20e086ecc5ceb99410739e..f5b0ea399b315e529465ee59aa2665d4f2a23d77 100644 (file)
@@ -1307,6 +1307,7 @@ static int AFPGetDevLinktype(int fd, const char *ifname)
         case ARPHRD_LOOPBACK:
             return LINKTYPE_ETHERNET;
         case ARPHRD_PPP:
+        case ARPHRD_NONE:
             return LINKTYPE_RAW;
         default:
             return ifr.ifr_hwaddr.sa_family;