diff options
| author | Maxim Konovalov <maxim@FreeBSD.org> | 2002-09-26 07:19:05 +0000 | 
|---|---|---|
| committer | Maxim Konovalov <maxim@FreeBSD.org> | 2002-09-26 07:19:05 +0000 | 
| commit | 87ec7a31564d2334a95d6c884789bf97f7127d1b (patch) | |
| tree | faee3b3ad1b6d7f49d65c23207e90375b1818495 | |
| parent | 80eae1f0ad4300d3b3df9c83c54a3e73cf19a00c (diff) | |
Notes
| -rw-r--r-- | sbin/ipfw/ipfw.c | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 70ecc052ccfb..0cb769674353 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -275,11 +275,11 @@ show_ipfw(struct ip_fw *chain, int pcwidth, int bcwidth)  	else  		printf(" %u", chain->fw_prot); +	printf(" from %s", chain->fw_flg & IP_FW_F_INVSRC ? "not " : ""); +  	if (chain->fw_flg & IP_FW_F_SME) { -		printf(" from me"); +		printf("me");  	} else { -		printf(" from %s", -		    chain->fw_flg & IP_FW_F_INVSRC ? "not " : "");  		adrt = ntohl(chain->fw_smsk.s_addr);  		if (adrt == ULONG_MAX && do_resolv) { @@ -321,11 +321,11 @@ show_ipfw(struct ip_fw *chain, int pcwidth, int bcwidth)  		}  	} +	printf(" to %s", chain->fw_flg & IP_FW_F_INVDST ? "not " : ""); +  	if (chain->fw_flg & IP_FW_F_DME) { -		printf(" to me"); +		printf("me");  	} else { -		printf(" to %s", chain->fw_flg & IP_FW_F_INVDST ? "not " : ""); -  		adrt = ntohl(chain->fw_dmsk.s_addr);  		if (adrt == ULONG_MAX && do_resolv) {  			adrt = (chain->fw_dst.s_addr); @@ -972,6 +972,8 @@ fill_reject_code(u_short *codep, char *str)  	u_long val;  	char *s; +	if (str == '\0') +		errx(EX_DATAERR, "missing unreachable code");  	val = strtoul(str, &s, 0);  	if (s != str && *s == '\0' && val < 0x100) {  		*codep = val;  | 
