Hello,

your change looks good to me as-is. Though I have one small
suggestion, which I don't insist on:

</snip>
> Index: sys/netinet/raw_ip.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/raw_ip.c,v
> retrieving revision 1.106
> diff -u -p -r1.106 raw_ip.c
> --- sys/netinet/raw_ip.c      20 Nov 2017 10:35:24 -0000      1.106
> +++ sys/netinet/raw_ip.c      27 Nov 2017 23:25:27 -0000
> @@ -149,7 +149,7 @@ rip_input(struct mbuf **mp, int *offp, i
>                       /* XXX rdomain support */
>                       if ((divert = pf_find_divert(m)) == NULL)
>                               continue;
> -                     if (!divert->addr.v4.s_addr)
                        KASSERT((divert->type == PF_DIVERT_REPLY) ||
                            (divert-type == PF_DIVERT_TO));
> +                     if (divert->type == PF_DIVERT_REPLY)
>                               goto divert_reply;
>                       if (inp->inp_laddr.s_addr != divert->addr.v4.s_addr)
>                               continue;
> Index: sys/netinet6/raw_ip6.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/raw_ip6.c,v
> retrieving revision 1.123
> diff -u -p -r1.123 raw_ip6.c
> --- sys/netinet6/raw_ip6.c    20 Nov 2017 10:35:24 -0000      1.123
> +++ sys/netinet6/raw_ip6.c    27 Nov 2017 23:25:27 -0000
> @@ -152,7 +152,7 @@ rip6_input(struct mbuf **mp, int *offp, 
>                       /* XXX rdomain support */
>                       if ((divert = pf_find_divert(m)) == NULL)
>                               continue;
                        KASSERT((divert->type == PF_DIVERT_REPLY) ||
                            (divert-type == PF_DIVERT_TO));
> -                     if (IN6_IS_ADDR_UNSPECIFIED(&divert->addr.v6))
> +                     if (divert->type == PF_DIVERT_REPLY)
>                               goto divert_reply;
>                       if (!IN6_ARE_ADDR_EQUAL(&in6p->inp_laddr6,
>                           &divert->addr.v6))


OK sashan@

  • pf divert type Alexander Bluhm
    • Re: pf divert type Alexandr Nedvedicky

Reply via email to