Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/dist/ipf/tools Pull up revision 1.18 (requested by martti...
details: https://anonhg.NetBSD.org/src/rev/01cf99301d06
branches: netbsd-3
changeset: 575111:01cf99301d06
user: tron <tron%NetBSD.org@localhost>
date: Mon Apr 04 18:26:05 2005 +0000
description:
Pull up revision 1.18 (requested by martti in ticket #106):
Upgraded IPFilter to 4.1.8
diffstat:
dist/ipf/tools/ipf_y.y | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r 3943ef961003 -r 01cf99301d06 dist/ipf/tools/ipf_y.y
--- a/dist/ipf/tools/ipf_y.y Mon Apr 04 18:25:58 2005 +0000
+++ b/dist/ipf/tools/ipf_y.y Mon Apr 04 18:26:05 2005 +0000
@@ -67,6 +67,7 @@
frentry_t fr;
frtuc_t *frt;
struct alist_s *alist;
+ u_short port;
struct {
u_short p1;
u_short p2;
@@ -79,7 +80,8 @@
union i6addr ip6;
};
-%type <num> portnum facility priority icmpcode seclevel secname icmptype
+%type <port> portnum
+%type <num> facility priority icmpcode seclevel secname icmptype
%type <num> opt compare range opttype flagset optlist ipv6hdrlist ipv6hdr
%type <num> portc porteq
%type <ipa> hostname ipv4 ipv4mask ipv4_16 ipv4_24
@@ -1084,15 +1086,15 @@
;
portnum:
- servicename { $$ = getport(frc, $1);
- if ($$ == -1)
+ servicename { if (getport(frc, $1, &($$)) == -1)
yyerror("service unknown");
$$ = ntohs($$);
free($1);
}
- | YY_NUMBER { $$ = $1;
- if ($$ < 0 || $$ > 65535)
+ | YY_NUMBER { if ($1 > 65535) /* Unsigned */
yyerror("invalid port number");
+ else
+ $$ = $1;
}
;
@@ -2042,7 +2044,7 @@
if ((opts & OPT_ZERORULEST) != 0) {
if ((*ioctlfunc)(fd, add, (void *)&obj) == -1) {
- if ((opts & OPT_DONOTHING) != 0) {
+ if ((opts & OPT_DONOTHING) == 0) {
fprintf(stderr, "%d:", yylineNum);
perror("ioctl(SIOCZRLST)");
}
Home |
Main Index |
Thread Index |
Old Index