Change in openvpn[master]: Minor fix on ifconfig parameter warning
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/736?usp=email
to review the following change.
Change subject: Minor fix on ifconfig parameter warning
......................................................................
Minor fix on ifconfig parameter warning
Handle the case of tun device and subnet topology in ifconfig_sanity_check(). Emit a warning if the second parameter of ifconfig doesn't look like a netmask.
---
M src/openvpn/tun.c
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/36/736/1
src/openvpn/tun.c +5 -4
@@ -510,20 +510,21 @@ {struct gc_arena gc =gc_new ();const bool looks_like_netmask = ((addr &0xFF000000 ) ==0xFF000000 ); -if (tun) +if (tun && (topology ==TOP_NET30 || topology ==TOP_P2P )) { -if (looks_like_netmask && (topology ==TOP_NET30 || topology ==TOP_P2P )) +if (looks_like_netmask) {msg (M_WARN ,"WARNING: Since you are using --dev tun with a point-to-point topology, the second argument to --ifconfig must be an IP address. You are using something (%s) that looks more like a netmask. %s" ,print_in_addr_t (addr,0 , &gc), ifconfig_warn_how_to_silence); } } -else /* tap */ +else /* tap or tun with subnet topology */ {if (!looks_like_netmask) { -msg (M_WARN ,"WARNING: Since you are using --dev tap, the second argument to --ifconfig must be a netmask, for example something like 255.255.255.0. %s" , +msg (M_WARN ,"WARNING: Since you are using --dev %s, the second argument to --ifconfig must be a netmask, for example something like 255.255.255.0. %s" , + tun ?"tun with a subnet topology" :"tap" , ifconfig_warn_how_to_silence); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/736?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f55eabd0e950edc3fbcd08b257257cf9ed9c8d8
Gerrit-Change-Number: 736
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: plaisthos, ralf_lici.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/736?usp=email )
Change subject: Minor fix on ifconfig parameter warning
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
This is a subset of https://gerrit.openvpn.net/c/openvpn/+/380 which we really should merge...
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/736?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f55eabd0e950edc3fbcd08b257257cf9ed9c8d8
Gerrit-Change-Number: 736
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Fri, 06 Sep 2024 16:00:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: flichtenheld, plaisthos.
ralf_lici has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/736?usp=email )
Change subject: Minor fix on ifconfig parameter warning
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Quoted 1 line
This is a subset of https://gerrit.openvpn.net/c/openvpn/+/380 which we really should merge...
I didn't know about that change. I guess I can delete this one then.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/736?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f55eabd0e950edc3fbcd08b257257cf9ed9c8d8
Gerrit-Change-Number: 736
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 09 Sep 2024 07:09:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment
ralf_lici has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/736?usp=email )
Change subject: Minor fix on ifconfig parameter warning
......................................................................
Abandoned
Commit is a subset of another commit
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/736?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f55eabd0e950edc3fbcd08b257257cf9ed9c8d8
Gerrit-Change-Number: 736
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon