[ipfilter-cvs] ipfilter/tools ipf_y.y,v5-1-RELEASE
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2014-06-17 11:50:52
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28289/tools Modified Files: Tag: v5-1-RELEASE ipf_y.y Log Message: #551 ipf.conf address structure not properly zero filled Index: ipf_y.y =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/tools/ipf_y.y,v retrieving revision 1.22.2.13 retrieving revision 1.22.2.14 diff -C2 -d -r1.22.2.13 -r1.22.2.14 *** ipf_y.y 8 Jun 2014 14:31:47 -0000 1.22.2.13 --- ipf_y.y 17 Jun 2014 11:50:50 -0000 1.22.2.14 *************** *** 1026,1030 **** yyexpectaddr = 0; } ! | hostname { $$.a = $1.adr; $$.f = $1.f; if ($1.f == AF_INET6) --- 1026,1031 ---- yyexpectaddr = 0; } ! | hostname { bzero(&($$), sizeof($$)); ! $$.a = $1.adr; $$.f = $1.f; if ($1.f == AF_INET6) *************** *** 1039,1043 **** maskspace { yysetdict(maskwords); yyexpectaddr = 2; } ! ipmask { ntomask($1.f, $5, $$.m.i6); $$.a = $1.adr; $$.a.i6[0] &= $$.m.i6[0]; --- 1040,1045 ---- maskspace { yysetdict(maskwords); yyexpectaddr = 2; } ! ipmask { bzero(&($$), sizeof($$)); ! ntomask($1.f, $5, $$.m.i6); $$.a = $1.adr; $$.a.i6[0] &= $$.m.i6[0]; *************** *** 1061,1065 **** yyexpectaddr = 0; } ! | '(' YY_STR ')' { $$.type = FRI_DYNAMIC; ifpflag = FRI_DYNAMIC; $$.ifpos = addname(&fr, $2); --- 1063,1068 ---- yyexpectaddr = 0; } ! | '(' YY_STR ')' { bzero(&($$), sizeof($$)); ! $$.type = FRI_DYNAMIC; ifpflag = FRI_DYNAMIC; $$.ifpos = addname(&fr, $2); *************** *** 1069,1073 **** { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = 0; --- 1072,1077 ---- { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { bzero(&($$), sizeof($$)); ! $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = 0; *************** *** 1084,1088 **** { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = $4; --- 1088,1093 ---- { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { bzero(&($$), sizeof($$)); ! $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = $4; *************** *** 1143,1147 **** hostname: ! ipv4 { $$.adr.in4 = $1; if (frc->fr_family == AF_INET6) YYERROR; --- 1148,1153 ---- hostname: ! ipv4 { bzero(&($$), sizeof($$)); ! $$.adr.in4 = $1; if (frc->fr_family == AF_INET6) YYERROR; *************** *** 1149,1153 **** yyexpectaddr = 2; } ! | YY_NUMBER { if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; --- 1155,1160 ---- yyexpectaddr = 2; } ! | YY_NUMBER { bzero(&($$), sizeof($$)); ! if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; *************** *** 1155,1159 **** yyexpectaddr = 2; } ! | YY_HEX { if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; --- 1162,1167 ---- yyexpectaddr = 2; } ! | YY_HEX { bzero(&($$), sizeof($$)); ! if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; *************** *** 1161,1170 **** yyexpectaddr = 2; } ! | YY_STR { if (lookuphost($1, &$$.adr) == 0) $$.f = AF_INET; free($1); yyexpectaddr = 2; } ! | YY_IPV6 { if (frc->fr_family == AF_INET) YYERROR; $$.adr = $1; --- 1169,1180 ---- yyexpectaddr = 2; } ! | YY_STR { bzero(&($$), sizeof($$)); ! if (lookuphost($1, &$$.adr) == 0) $$.f = AF_INET; free($1); yyexpectaddr = 2; } ! | YY_IPV6 { bzero(&($$), sizeof($$)); ! if (frc->fr_family == AF_INET) YYERROR; $$.adr = $1; |