[ipfilter-cvs] ipfilter/tools ipnat_y.y,v5-1-RELEASE
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-06-20 03:46:38
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory vz-cvs-4.sog:/tmp/cvs-serv17916/tools Modified Files: Tag: v5-1-RELEASE ipnat_y.y Log Message: 3536479 ipnat.conf line numbers not stored Index: ipnat_y.y =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/tools/ipnat_y.y,v retrieving revision 1.19.2.8 retrieving revision 1.19.2.9 diff -C2 -d -r1.19.2.8 -r1.19.2.9 *** ipnat_y.y 19 Jun 2012 07:56:34 -0000 1.19.2.8 --- ipnat_y.y 20 Jun 2012 03:46:36 -0000 1.19.2.9 *************** *** 147,152 **** err = (*nataddfunc)(natfd, natioctlfunc, nat); free(nat); ! if (err != 0) parser_error = err; } if (parser_error == 0 && prules != NULL) { --- 147,154 ---- err = (*nataddfunc)(natfd, natioctlfunc, nat); free(nat); ! if (err != 0) { parser_error = err; + break; + } } if (parser_error == 0 && prules != NULL) { *************** *** 1302,1305 **** --- 1304,1309 ---- char *s; + yylineNum = 1; + (void) yysettab(yywords); *************** *** 1342,1347 **** int i; - yylineNum = 1; - natfd = fd; parser_error = 0; --- 1346,1349 ---- *************** *** 1388,1391 **** --- 1390,1394 ---- } + n->in_flineno = yylineNum; n->in_ifnames[0] = -1; n->in_ifnames[1] = -1; *************** *** 1523,1526 **** --- 1526,1533 ---- sprintf(msg, "%d:ioctl(add/insert nat rule)", yylineNum); + if (errno == EEXIST) { + sprintf(msg + strlen(msg), "(line %d)", + ipn->in_flineno); + } return ipf_perror_fd(fd, ioctlfunc, msg); } |