[ipfilter-cvs] ipfilter/tools ipf_y.y,
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2014-06-17 11:50:49
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28278/tools Modified Files: 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.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ipf_y.y 8 Jun 2014 14:31:38 -0000 1.36 --- ipf_y.y 17 Jun 2014 11:50:47 -0000 1.37 *************** *** 1024,1028 **** yyexpectaddr = 0; } ! | hostname { $$.a = $1.adr; $$.f = $1.f; if ($1.f == AF_INET6) --- 1024,1029 ---- yyexpectaddr = 0; } ! | hostname { bzero(&($$), sizeof($$)); ! $$.a = $1.adr; $$.f = $1.f; if ($1.f == AF_INET6) *************** *** 1037,1041 **** maskspace { yysetdict(maskwords); yyexpectaddr = 2; } ! ipmask { ntomask($1.f, $5, $$.m.i6); $$.a = $1.adr; $$.a.i6[0] &= $$.m.i6[0]; --- 1038,1043 ---- maskspace { yysetdict(maskwords); yyexpectaddr = 2; } ! ipmask { bzero(&($$), sizeof($$)); ! ntomask($1.f, $5, $$.m.i6); $$.a = $1.adr; $$.a.i6[0] &= $$.m.i6[0]; *************** *** 1059,1063 **** yyexpectaddr = 0; } ! | '(' YY_STR ')' { $$.type = FRI_DYNAMIC; ifpflag = FRI_DYNAMIC; $$.ifpos = addname(&fr, $2); --- 1061,1066 ---- yyexpectaddr = 0; } ! | '(' YY_STR ')' { bzero(&($$), sizeof($$)); ! $$.type = FRI_DYNAMIC; ifpflag = FRI_DYNAMIC; $$.ifpos = addname(&fr, $2); *************** *** 1067,1071 **** { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = 0; --- 1070,1075 ---- { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { bzero(&($$), sizeof($$)); ! $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = 0; *************** *** 1082,1086 **** { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = $4; --- 1086,1091 ---- { ifpflag = FRI_DYNAMIC; yysetdict(maskwords); } maskopts ! { bzero(&($$), sizeof($$)); ! $$.type = ifpflag; $$.ifpos = addname(&fr, $2); $$.lif = $4; *************** *** 1141,1145 **** hostname: ! ipv4 { $$.adr.in4 = $1; if (frc->fr_family == AF_INET6) YYERROR; --- 1146,1151 ---- hostname: ! ipv4 { bzero(&($$), sizeof($$)); ! $$.adr.in4 = $1; if (frc->fr_family == AF_INET6) YYERROR; *************** *** 1147,1151 **** yyexpectaddr = 2; } ! | YY_NUMBER { if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; --- 1153,1158 ---- yyexpectaddr = 2; } ! | YY_NUMBER { bzero(&($$), sizeof($$)); ! if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; *************** *** 1153,1157 **** yyexpectaddr = 2; } ! | YY_HEX { if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; --- 1160,1165 ---- yyexpectaddr = 2; } ! | YY_HEX { bzero(&($$), sizeof($$)); ! if (frc->fr_family == AF_INET6) YYERROR; $$.adr.in4_addr = $1; *************** *** 1159,1168 **** 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; --- 1167,1178 ---- 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; |