[ipfilter-cvs] ipfilter/tools ipnat_y.y,v5-1-RELEASE
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-06-05 04:46:27
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory vz-cvs-4.sog:/tmp/cvs-serv12025/tools Modified Files: Tag: v5-1-RELEASE ipnat_y.y Log Message: 3531870 ipnat.conf parsing needs to support inet6 Index: ipnat_y.y =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/tools/ipnat_y.y,v retrieving revision 1.19.2.5 retrieving revision 1.19.2.6 diff -C2 -d -r1.19.2.5 -r1.19.2.6 *** ipnat_y.y 29 May 2012 12:22:39 -0000 1.19.2.5 --- ipnat_y.y 5 Jun 2012 04:46:25 -0000 1.19.2.6 *************** *** 119,123 **** %token IPNY_TLATE IPNY_POOL IPNY_HASH IPNY_NO IPNY_REWRITE IPNY_PROTO %token IPNY_ON IPNY_SRC IPNY_DST IPNY_IN IPNY_OUT IPNY_DIVERT IPNY_ENCAP ! %token IPNY_CONFIG IPNY_ALLOW IPNY_DENY IPNY_DNS %token IPNY_SEQUENTIAL IPNY_DSTLIST IPNY_PURGE %type <port> portspec --- 119,123 ---- %token IPNY_TLATE IPNY_POOL IPNY_HASH IPNY_NO IPNY_REWRITE IPNY_PROTO %token IPNY_ON IPNY_SRC IPNY_DST IPNY_IN IPNY_OUT IPNY_DIVERT IPNY_ENCAP ! %token IPNY_CONFIG IPNY_ALLOW IPNY_DENY IPNY_DNS IPNY_INET IPNY_INET6 %token IPNY_SEQUENTIAL IPNY_DSTLIST IPNY_PURGE %type <port> portspec *************** *** 355,359 **** rewrite: IPNY_REWRITE oninout rwrproto mapfrom tlate newdst newopts ! { if (nat->in_redir & NAT_MAP) setmapifnames(); else --- 355,360 ---- rewrite: IPNY_REWRITE oninout rwrproto mapfrom tlate newdst newopts ! { nat->in_v[0] = ftov($4); ! if (nat->in_redir & NAT_MAP) setmapifnames(); else *************** *** 364,368 **** divert: IPNY_DIVERT oninout rwrproto mapfrom tlate divdst newopts ! { if (nat->in_redir & NAT_MAP) { setmapifnames(); nat->in_pr[0] = IPPROTO_UDP; --- 365,370 ---- divert: IPNY_DIVERT oninout rwrproto mapfrom tlate divdst newopts ! { nat->in_v[0] = ftov($4); ! if (nat->in_redir & NAT_MAP) { setmapifnames(); nat->in_pr[0] = IPPROTO_UDP; *************** *** 376,380 **** encap: IPNY_ENCAP oninout rwrproto mapfrom tlate encapdst newopts ! { if (nat->in_redir & NAT_MAP) { setmapifnames(); nat->in_pr[0] = IPPROTO_IPIP; --- 378,383 ---- encap: IPNY_ENCAP oninout rwrproto mapfrom tlate encapdst newopts ! { nat->in_v[0] = ftov($4); ! if (nat->in_redir & NAT_MAP) { setmapifnames(); nat->in_pr[0] = IPPROTO_IPIP; *************** *** 817,822 **** ifnames: ! ifname { yyexpectaddr = 1; } ! | ifname ',' otherifname { yyexpectaddr = 1; } ; --- 820,825 ---- ifnames: ! ifname family { yyexpectaddr = 1; } ! | ifname ',' otherifname family { yyexpectaddr = 1; } ; *************** *** 826,829 **** --- 829,836 ---- ; + family: | IPNY_INET { nat->in_v[0] = 4; nat->in_v[1] = 4; } + | IPNY_INET6 { nat->in_v[0] = 6; nat->in_v[1] = 6; } + ; + otherifname: YY_STR { setifname(&nat, 1, $1); *************** *** 1236,1239 **** --- 1243,1248 ---- { "icmpidmap", IPNY_ICMPIDMAP }, { "in", IPNY_IN }, + { "inet", IPNY_INET }, + { "inet6", IPNY_INET6 }, { "mask", IPNY_MASK }, { "map", IPNY_MAP }, |