diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-12-03 12:46:17 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-12-03 12:46:17 +0000 |
commit | 26f4c3114031a802aaaaf52f6221ca903398738b (patch) | |
tree | a7a150e2c3fc23b7c444d7f3a7d5714fedf03453 /sbin | |
parent | ed5b2b7844c7e78f6e26ba51a83a885510596fdd (diff) |
pfctl_set_hostid always returns 0; don't pretend otherwise and make it a
void function instead.
ok dlg
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/parse.y | 7 | ||||
-rw-r--r-- | sbin/pfctl/pfctl.c | 6 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_parser.h | 4 |
3 files changed, 6 insertions, 11 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index b90334cb59d..ef9de03522f 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.610 2011/10/13 18:30:54 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.611 2011/12/03 12:46:16 mcbride Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -608,10 +608,7 @@ option : SET REASSEMBLE yesno optnodf { yyerror("hostid must be non-zero"); YYERROR; } - if (pfctl_set_hostid(pf, $3) != 0) { - yyerror("error setting hostid %08x", $3); - YYERROR; - } + pfctl_set_hostid(pf, $3); } | SET BLOCKPOLICY DROP { if (pf->opts & PF_OPT_VERBOSE) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 1794d5a3b97..4bf52a8cbcc 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.307 2011/12/03 12:44:56 mcbride Exp $ */ +/* $OpenBSD: pfctl.c,v 1.308 2011/12/03 12:46:16 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1669,7 +1669,7 @@ pfctl_load_logif(struct pfctl *pf, char *ifname) return (0); } -int +void pfctl_set_hostid(struct pfctl *pf, u_int32_t hostid) { HTONL(hostid); @@ -1679,8 +1679,6 @@ pfctl_set_hostid(struct pfctl *pf, u_int32_t hostid) if (pf->opts & PF_OPT_VERBOSE) printf("set hostid 0x%08x\n", ntohl(hostid)); - - return (0); } int diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 4be15cc40f0..2f510b58328 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.h,v 1.98 2011/11/23 10:24:37 henning Exp $ */ +/* $OpenBSD: pfctl_parser.h,v 1.99 2011/12/03 12:46:16 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -209,7 +209,7 @@ int pfctl_set_reassembly(struct pfctl *, int, int); int pfctl_set_optimization(struct pfctl *, const char *); int pfctl_set_limit(struct pfctl *, const char *, unsigned int); int pfctl_set_logif(struct pfctl *, char *); -int pfctl_set_hostid(struct pfctl *, u_int32_t); +void pfctl_set_hostid(struct pfctl *, u_int32_t); int pfctl_set_debug(struct pfctl *, char *); int pfctl_set_interface_flags(struct pfctl *, char *, int, int); |