Hi, After upgrading from 12.1 to 12.2, the mpd5 binary compiled under 12.1 started giving this error message: Oct 29 15:14:40 server mpd[25294]: [E] can't set NAT redirect-port: Invalid argument The config line in question was: set nat red-port tcp 0.0.0.0 8080 192.168.1.2 8080 "show nat" in the CLI showed the line as "(inactive)". After recompiling mpd5-5.9 and restarting the daemon, the error message did not reappear, "(inactive)" changed to "(active)" and the port forward started working again. I suggest incrementing the port revision to force a recompile with the new system headers. I've not tested backwards compatibility.
Adding some more eyes. Dear colleagues, do we have ABI breakage here for stable/12?
I don't remember and don't see from a quick look any changes in ipfw/nat that could be related to such breakage. I suspect mpd5 uses ng_nat, thus probably the breakage is netgraph related. I think it is your r359697, that added NGM_NAT_{SET/GET}_DLT in the middle of enum.
That sounds plausible. I don't use pf or ipfw+natd in this setup, mpd5 indeed uses cg_nat: # ngctl list | grep nat Name: mpd33913-E-nat Type: nat ID: 0000006b Num hooks: 2
Created attachment 219265 [details] restore ABI for ng_nat
I've reproduced the problem installing 12.1-RELEASE/amd64 into new virtual maching, installing mpd5-5.9 package from quarterly branch for 12.1, upgrading to 12.2-RELEASE with freebsd-update and running old binary with corresponding configuration (pptp client/server) with nat redirect. Andrey's analisys is right as attached patch for ng_nat kernel module restores ABI compatibility. Should I commit the patch to stable/12 directly to restore ABI?
I think it is too late, with this commit you will break it again for those who already did update.
(In reply to Andrey V. Elsukov from comment #6) I suspect the number of people who updated and run their own packages is probably quite small compared to the number of people this might affect (people running 12.2 with our packages for the next 3 months)
A commit references this bug: Author: eugen Date: Tue Nov 10 02:26:45 UTC 2020 New revision: 367545 URL: https://svnweb.freebsd.org/changeset/base/367545 Log: ng_nat: unbreak ABI The revision r342168 broke ABI of ng_nat needlessly and the change was merged to stable branches breaking ABI there, too. Unbreak it. PR: 250722 MFC after: 1 week Changes: head/sys/netgraph/ng_nat.h
A commit references this bug: Author: eugen Date: Tue Nov 17 05:00:24 UTC 2020 New revision: 367747 URL: https://svnweb.freebsd.org/changeset/base/367747 Log: MFC r367545: ng_nat: unbreak ABI The revision r342168 broke ABI of ng_nat needlessly and the change was merged to stable branches breaking ABI there, too. Unbreak it. PR: 250722 Changes: _U stable/12/ stable/12/sys/netgraph/ng_nat.h
A commit references this bug: Author: eugen Date: Tue Nov 17 05:01:55 UTC 2020 New revision: 367748 URL: https://svnweb.freebsd.org/changeset/base/367748 Log: MFC r367545: ng_nat: unbreak ABI The revision r342168 broke ABI of ng_nat needlessly and the change was merged to stable branches breaking ABI there, too. Unbreak it. PR: 250722 Changes: _U stable/11/ stable/11/sys/netgraph/ng_nat.h
Thank you very much for the report. The ABI was fixed. Unfortunately, this means you will need to rebuild your mpd5 binary again when you upgrade base system next time.
Thanks, everyone!