[kernel] Package AHCI driver
[openwrt.git] / package / libpcap / patches / 102-alt-ether.patch
1 Index: libpcap-0.9.4/nametoaddr.c
2 ===================================================================
3 --- libpcap-0.9.4.orig/nametoaddr.c 2007-06-04 13:22:03.499323304 +0200
4 +++ libpcap-0.9.4/nametoaddr.c 2007-06-04 13:22:03.986249280 +0200
5 @@ -410,7 +410,7 @@
6 e = ep = (u_char *)malloc(6);
7
8 while (*s) {
9 - if (*s == ':')
10 + if (*s == ':' || *s == '.')
11 s += 1;
12 d = xdtoi(*s++);
13 if (isxdigit((unsigned char)*s)) {
14 Index: libpcap-0.9.4/scanner.l
15 ===================================================================
16 --- libpcap-0.9.4.orig/scanner.l 2007-06-04 13:22:03.506322240 +0200
17 +++ libpcap-0.9.4/scanner.l 2007-06-04 13:22:03.987249128 +0200
18 @@ -80,6 +80,7 @@
19 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
20 B ([0-9A-Fa-f][0-9A-Fa-f]?)
21 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
22 +X [0-9A-Fa-f]
23
24 %a 16000
25 %o 19000
26 @@ -306,7 +307,7 @@
27 {N} { yylval.i = stoi((char *)yytext); return NUM; }
28 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
29 yylval.s = sdup((char *)yytext); return HID; }
30 -{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
31 +({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext);
32 return EID; }
33 {V6} {
34 #ifdef INET6
35 @@ -324,6 +325,7 @@
36 #endif /*INET6*/
37 }
38 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
39 +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
40 icmptype { yylval.i = 0; return NUM; }
41 icmpcode { yylval.i = 1; return NUM; }
42 icmp-echoreply { yylval.i = 0; return NUM; }
This page took 0.041173 seconds and 5 git commands to generate.