1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-19 15:33:56 +00:00

Regigle parens to try and get the intended affect. This should fix people

having trouble with the "me6" keyword. Also, we were using inet_pton on
the wrong variable in one place.

Reviewed by:	mlaier (previous version of patch)
Obtained from:	Sascha Blank (inet_pton change)
MFC after:	1 week
This commit is contained in:
David Malone 2006-08-20 20:10:36 +00:00
parent 695e93d68e
commit e28cb02537
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161483

View File

@ -3797,10 +3797,10 @@ add_src(ipfw_insn *cmd, char *av, u_char proto)
inet_pton(AF_INET6, host, &a))
ret = add_srcip6(cmd, av);
/* XXX: should check for IPv4, not !IPv6 */
if ((ret == NULL) && proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
!inet_pton(AF_INET6, host, &a))
if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
!inet_pton(AF_INET6, host, &a)))
ret = add_srcip(cmd, av);
if ((ret == NULL) && strcmp(av, "any") != 0)
if (ret == NULL && strcmp(av, "any") != 0)
ret = cmd;
free(host);
@ -3823,10 +3823,10 @@ add_dst(ipfw_insn *cmd, char *av, u_char proto)
inet_pton(AF_INET6, host, &a))
ret = add_dstip6(cmd, av);
/* XXX: should check for IPv4, not !IPv6 */
if ((ret == NULL) && proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
!inet_pton(AF_INET6, av, &a))
if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 ||
!inet_pton(AF_INET6, host, &a)))
ret = add_dstip(cmd, av);
if ((ret == NULL) && strcmp(av, "any") != 0)
if (ret == NULL && strcmp(av, "any") != 0)
ret = cmd;
free(host);