In message <201703060041.v260fx8i056...@repo.freebsd.org>, "Andrey V. 
Elsukov"
writes:
> Author: ae
> Date: Mon Mar  6 00:41:59 2017
> New Revision: 314718
> URL: https://svnweb.freebsd.org/changeset/base/314718
> 
> Log:
>   Fix the build. Use new ipfw_lookup_table() in the nat64 too.
>   
>   Reported by:        cy
>   MFC after:  2 weeks
> 
> Modified:
>   head/sys/netpfil/ipfw/nat64/nat64stl.c
> 
> Modified: head/sys/netpfil/ipfw/nat64/nat64stl.c
> =============================================================================
> =
> --- head/sys/netpfil/ipfw/nat64/nat64stl.c    Sun Mar  5 23:59:04 2017
>       (r314717)
> +++ head/sys/netpfil/ipfw/nat64/nat64stl.c    Mon Mar  6 00:41:59 2017
>       (r314718)
> @@ -184,7 +184,7 @@ nat64stl_handle_icmp6(struct ip_fw_chain
>        * IPv4 mapped address.
>        */
>       ip6i = mtodo(m, hlen);
> -     if (ipfw_lookup_table_extended(chain, cfg->map64,
> +     if (ipfw_lookup_table(chain, cfg->map64,
>           sizeof(struct in6_addr), &ip6i->ip6_dst, &tablearg) == 0) {
>               m_freem(m);
>               return (NAT64RETURN);
> @@ -204,6 +204,7 @@ ipfw_nat64stl(struct ip_fw_chain *chain,
>  {
>       ipfw_insn *icmd;
>       struct nat64stl_cfg *cfg;
> +     in_addr_t dst4;
>       uint32_t tablearg;
>       int ret;
>  
> @@ -219,11 +220,12 @@ ipfw_nat64stl(struct ip_fw_chain *chain,
>  
>       switch (args->f_id.addr_type) {
>       case 4:
> -             ret = ipfw_lookup_table(chain, cfg->map46,
> -                 htonl(args->f_id.dst_ip), &tablearg);
> +             dst4 = htonl(args->f_id.dst_ip);
> +             ret = ipfw_lookup_table(chain, cfg->map46, sizeof(in_addr_t),
> +                 &dst4, &tablearg);
>               break;
>       case 6:
> -             ret = ipfw_lookup_table_extended(chain, cfg->map64,
> +             ret = ipfw_lookup_table(chain, cfg->map64,
>                   sizeof(struct in6_addr), &args->f_id.src_ip6, &tablearg);
>               break;
>       default:
> 
> 

Cool. Thanks. Better than my quick workaround before I leave the house..


-- 
Cheers,
Cy Schubert <cy.schub...@cschubert.com>
FreeBSD UNIX:  <c...@freebsd.org>   Web:  http://www.FreeBSD.org

        The need of the many outweighs the greed of the few.


_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to