Move curl from packages to trunk, opkg depends on it
[openwrt.git] / package / libpcap / patches / 102-alt-ether.patch
1 --- a/nametoaddr.c
2 +++ b/nametoaddr.c
3 @@ -410,7 +410,7 @@
4 e = ep = (u_char *)malloc(6);
5
6 while (*s) {
7 - if (*s == ':')
8 + if (*s == ':' || *s == '.')
9 s += 1;
10 d = xdtoi(*s++);
11 if (isxdigit((unsigned char)*s)) {
12 --- a/scanner.l
13 +++ b/scanner.l
14 @@ -80,6 +80,7 @@
15 N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
16 B ([0-9A-Fa-f][0-9A-Fa-f]?)
17 W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
18 +X [0-9A-Fa-f]
19
20 %a 18400
21 %o 21500
22 @@ -310,7 +311,7 @@
23 {N} { yylval.i = stoi((char *)yytext); return NUM; }
24 ({N}\.{N})|({N}\.{N}\.{N})|({N}\.{N}\.{N}\.{N}) {
25 yylval.s = sdup((char *)yytext); return HID; }
26 -{B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext);
27 +({B}:{B}:{B}:{B}:{B}:{B})|({B}\.{B}\.{B}\.{B}\.{B}\.{B}) { yylval.e = pcap_ether_aton((char *)yytext);
28 return EID; }
29 {V6} {
30 #ifdef INET6
31 @@ -328,6 +329,7 @@
32 #endif /*INET6*/
33 }
34 {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); }
35 +{X}{12} { yylval.e = pcap_ether_aton((char *)yytext); return EID;}
36 icmptype { yylval.i = 0; return NUM; }
37 icmpcode { yylval.i = 1; return NUM; }
38 icmp-echoreply { yylval.i = 0; return NUM; }
This page took 0.044217 seconds and 5 git commands to generate.