diff options
Diffstat (limited to 'net/mlvpn/files/patch-src_config.c')
-rw-r--r-- | net/mlvpn/files/patch-src_config.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/net/mlvpn/files/patch-src_config.c b/net/mlvpn/files/patch-src_config.c new file mode 100644 index 000000000000..5b9b5d498dd0 --- /dev/null +++ b/net/mlvpn/files/patch-src_config.c @@ -0,0 +1,57 @@ +--- src/config.c.orig 2015-12-28 11:20:16 UTC ++++ src/config.c +@@ -269,6 +269,7 @@ mlvpn_config(int config_file_fd, int fir + } else if (strncmp(lastSection, "filters", 7) != 0) { + char *bindaddr; + char *bindport; ++ uint32_t bindfib = 0; + char *dstaddr; + char *dstport; + uint32_t bwlimit = 0; +@@ -284,6 +285,9 @@ mlvpn_config(int config_file_fd, int fir + _conf_set_str_from_conf( + config, lastSection, "bindport", &bindport, NULL, + "bind port is mandatory in server mode.\n", 1); ++ _conf_set_uint_from_conf( ++ config, lastSection, "bindfib", &bindfib, 0, ++ NULL, 0); + _conf_set_str_from_conf( + config, lastSection, "remotehost", &dstaddr, NULL, + NULL, 0); +@@ -297,6 +301,9 @@ mlvpn_config(int config_file_fd, int fir + _conf_set_str_from_conf( + config, lastSection, "bindport", &bindport, NULL, + NULL, 0); ++ _conf_set_uint_from_conf( ++ config, lastSection, "bindfib", &bindfib, 0, ++ NULL, 0); + _conf_set_str_from_conf( + config, lastSection, "remotehost", &dstaddr, NULL, + "No remote address specified.\n", 1); +@@ -336,6 +343,7 @@ mlvpn_config(int config_file_fd, int fir + tmptun->name); + if ((! mystr_eq(tmptun->bindaddr, bindaddr)) || + (! mystr_eq(tmptun->bindport, bindport)) || ++ (tmptun->bindfib != bindfib) || + (! mystr_eq(tmptun->destaddr, dstaddr)) || + (! mystr_eq(tmptun->destport, dstport))) { + mlvpn_rtun_status_down(tmptun); +@@ -347,6 +355,9 @@ mlvpn_config(int config_file_fd, int fir + if (bindport) { + strlcpy(tmptun->bindport, bindport, sizeof(tmptun->bindport)); + } ++ if (tmptun->bindfib != bindfib) { ++ tmptun->bindfib = bindfib; ++ } + if (dstaddr) { + strlcpy(tmptun->destaddr, dstaddr, sizeof(tmptun->destaddr)); + } +@@ -380,7 +391,7 @@ mlvpn_config(int config_file_fd, int fir + { + log_info("config", "%s tunnel added", lastSection); + mlvpn_rtun_new( +- lastSection, bindaddr, bindport, dstaddr, dstport, ++ lastSection, bindaddr, bindport, bindfib, dstaddr, dstport, + default_server_mode, timeout, fallback_only, + bwlimit, loss_tolerence); + } |