View | Details | Raw Unified | Return to bug 240650 | Differences between
and this patch

Collapse All | Expand All

(-)sbin/ipfw/ipfw2.c (-3 / +2 lines)
Lines 3717-3725 Link Here
3717
	if (proto == IPPROTO_IPV6  || strcmp(av, "me6") == 0 ||
3717
	if (proto == IPPROTO_IPV6  || strcmp(av, "me6") == 0 ||
3718
	    inet_pton(AF_INET6, host, &a) == 1)
3718
	    inet_pton(AF_INET6, host, &a) == 1)
3719
		ret = add_srcip6(cmd, av, cblen, tstate);
3719
		ret = add_srcip6(cmd, av, cblen, tstate);
3720
	/* XXX: should check for IPv4, not !IPv6 */
3720
	if (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
3721
	if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
3721
	    inet_pton(AF_INET, host, &a) == 1)
3722
	    inet_pton(AF_INET6, host, &a) != 1))
3723
		ret = add_srcip(cmd, av, cblen, tstate);
3722
		ret = add_srcip(cmd, av, cblen, tstate);
3724
	if (ret == NULL && strcmp(av, "any") != 0)
3723
	if (ret == NULL && strcmp(av, "any") != 0)
3725
		ret = cmd;
3724
		ret = cmd;

Return to bug 240650