summaryrefslogtreecommitdiffstats
path: root/src/openvpn/mroute.c
Commit message (Collapse)AuthorAgeFilesLines
* Print remote IPv4 address on a dual-stack v6 socket in IPv4 formatGert Doering2015-02-151-2/+10
| | | | | | | | | | | | | | | | | | | Previously, the code would print IPv4-mapped format ("::ffff:1.2.3.4"), which is technically correct but adds no extra value, and is confusingly different from the output if using a v4 socket. Print "1.2.3.4" instead, whatever socket type is used. Affects client IP address in log file, status output (mroute_addr_print_ex), and environment (setenv_sockaddr). The fact that a dual-stack socket was used is still visible in the initial peer connect message in the log: '... Peer Connection Initiated with [AF_INET6]::ffff:1.1.3.4:53779' Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <1419875325-96015-1-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/9363
* Cleanup ir6->netbits handling.Gert Doering2014-01-111-45/+11
| | | | | | | | | | | | | | | | | Get rid of all "if (ir6->netbits>=0)" checks, as those are always true (unlike ir->netbits for IPv4, we don't do the special case for "if it's a host, put -1 in there" for IPv6). Merge mroute_helper_{add,del}_iroute and mroute_helper_{add,del}_iroute6 into unified mroute_helper_{add,del}_iroute46() function as they did the same thing anyway, just with slightly different parameters. Make Arne happy. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <1389371142-26705-2-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/8198
* Repair "tap server" mode brokenness caused by <stdbool.h> falloutGert Doering2012-07-021-1/+1
| | | | | | | | | | | | | | | Operator/Cast precedence wrong: casting mac[0] to (bool) first - giving "1" for "any mac address that does not start with 00:" - and only then bit-anding with "1" - thus always returning "true". Which, in turn, leads to "reject all incoming packets with 'bad source address'". OpenVPN bug #216. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Fabian Knittel <fabian.knittel@lettink.de> Message-Id: 1341089443-2287-1-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6817 Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* cleanup: avoid using ~0 - netmaskAlon Bar-Lev2012-04-021-1/+1
| | | | | | | | Use IPV4_NETMASK_HOST constant. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move out config.h include from sysheadAlon Bar-Lev2012-03-221-0/+6
| | | | | | | | | | | Yet another step in reducing the syshead.h content. Conditional compilation of sources needs to be based on a minimum program prefix (config.h only). Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: standard directory layoutAlon Bar-Lev2012-03-221-0/+552
Suitable for mature project. root - administrative stuff doc - documents src - sources tests - tests distro - distro specific files sample - samples SIDE EFFECT: many changes to rpm spec. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: David Sommerseth <davids@redhat.com>