Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/dist/ipf/tools Pull up revision 1.4 (requested by chris...
details: https://anonhg.NetBSD.org/src/rev/2ab04d6fa477
branches: netbsd-2-0
changeset: 561196:2ab04d6fa477
user: tron <tron%NetBSD.org@localhost>
date: Sun May 30 11:21:36 2004 +0000
description:
Pull up revision 1.4 (requested by christos in ticket #416):
PR/25365: HIROSE yuuji: ipf 4.1.1 fails to parse ipv6 address in fastroute
destination. Patch from darren applied.
diffstat:
dist/ipf/tools/ipf_y.y | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diffs (68 lines):
diff -r f381e48673f5 -r 2ab04d6fa477 dist/ipf/tools/ipf_y.y
--- a/dist/ipf/tools/ipf_y.y Sun May 30 11:21:28 2004 +0000
+++ b/dist/ipf/tools/ipf_y.y Sun May 30 11:21:36 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipf_y.y,v 1.1.1.1.2.2 2004/04/09 21:16:04 jmc Exp $ */
+/* $NetBSD: ipf_y.y,v 1.1.1.1.2.3 2004/05/30 11:21:36 tron Exp $ */
%{
#include "ipf.h"
@@ -477,11 +477,22 @@
{ strncpy(fr->fr_dif.fd_ifname, $2, sizeof(fr->fr_dif.fd_ifname));
free($2);
}
- | IPFY_DUPTO name ':' hostname
+ | IPFY_DUPTO name duptoseparator hostname
{ strncpy(fr->fr_dif.fd_ifname, $2, sizeof(fr->fr_dif.fd_ifname));
fr->fr_dif.fd_ip = $4;
+ yyexpectaddr = 0;
free($2);
}
+ | IPFY_DUPTO name duptoseparator YY_IPV6
+ { strncpy(fr->fr_dif.fd_ifname, $2, sizeof(fr->fr_dif.fd_ifname));
+ bcopy(&$4, &fr->fr_dif.fd_ip6, sizeof(fr->fr_dif.fd_ip6));
+ yyexpectaddr = 0;
+ free($2);
+ }
+ ;
+
+duptoseparator:
+ ':' { yyexpectaddr = 1; yycont = &yyexpectaddr; resetaddr(); }
;
froute: IPFY_FROUTE { fr->fr_flags |= FR_FASTROUTE; }
@@ -491,9 +502,16 @@
{ strncpy(fr->fr_tif.fd_ifname, $2, sizeof(fr->fr_tif.fd_ifname));
free($2);
}
- | routeto name ':' hostname
+ | routeto name duptoseparator hostname
{ strncpy(fr->fr_tif.fd_ifname, $2, sizeof(fr->fr_tif.fd_ifname));
fr->fr_tif.fd_ip = $4;
+ yyexpectaddr = 0;
+ free($2);
+ }
+ | routeto name duptoseparator YY_IPV6
+ { strncpy(fr->fr_tif.fd_ifname, $2, sizeof(fr->fr_tif.fd_ifname));
+ bcopy(&$4, &fr->fr_tif.fd_ip6, sizeof(fr->fr_tif.fd_ip6));
+ yyexpectaddr = 0;
free($2);
}
;
@@ -508,7 +526,7 @@
{ strncpy(fr->fr_rif.fd_ifname, $2, sizeof(fr->fr_rif.fd_ifname));
free($2);
}
- | IPFY_REPLY_TO name ':' hostname
+ | IPFY_REPLY_TO name duptoseparator hostname
{ strncpy(fr->fr_rif.fd_ifname, $2, sizeof(fr->fr_rif.fd_ifname));
fr->fr_rif.fd_ip = $4;
free($2);
@@ -756,6 +774,7 @@
fill6bits(128, (u_32_t *)&$$.m); }
| YY_IPV6 maskspace ipv6mask { bcopy(&$1, &$$.a, sizeof($$.a));
bcopy(&$3, &$$.m, sizeof($$.m)); }
+ ;
maskspace:
'/'
Home |
Main Index |
Thread Index |
Old Index