[Bug 261802] net/mpd5: set nat red-port with an alias_addr of 0.0.0.0 does not work anymore

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 08 Feb 2022 20:53:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261802

            Bug ID: 261802
           Summary: net/mpd5: set nat red-port with an alias_addr of
                    0.0.0.0 does not work anymore
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: eugen@freebsd.org
          Reporter: d8zNeCFG@aon.at
          Assignee: eugen@freebsd.org
             Flags: maintainer-feedback?(eugen@freebsd.org)

Scenario:
- FreeBSD 12.3 latest
- ports latest
- using mpd5 with the following statement:

        # set nat red-port proto alias_addr alias_port local_addr local_port [
remote_addr remote_port ]
        set nat red-port tcp 0.0.0.0 8765 192.168.1.5 12345 11.12.13.14 0

- The intention is that whenever the remote host 11.12.13.14 connects from any
source port to the aliased port 8765, regardless of alias_addr, the connection
is redirected to the local port 12345 on the local address 192.168.1.5.
- The alias_addr is dynamically assigned and may change, therefore 0.0.0.0 is
used as a wildcard. See LibAliasRedirectPort() in libalias(3).

Result:
- This worked until a few weeks ago.
- Now the rule does not seem to work anymore, i.e., the aliasing does not take
place, and the TCP destination stays at <alias_addr>:8765 instead of being
redirected to 192.168.1.5:12345.

Note:
- This might actually be an issue in the base system, with ng_nat and libalias.

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.