diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-11-27 17:09:13 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-11-27 17:09:13 +0000 |
commit | ef8ac29ba3d237a19175ad7252d709c9a74bc051 (patch) | |
tree | b0730c77a5711b1dc33eb1195ded6d2306cd0a14 /usr.sbin/unwindctl | |
parent | eea03b2cf9ebda5eab296063580192f3601c9f64 (diff) |
Nuke http captive portal detection; something better is coming.
OK otto
Diffstat (limited to 'usr.sbin/unwindctl')
-rw-r--r-- | usr.sbin/unwindctl/parser.c | 9 | ||||
-rw-r--r-- | usr.sbin/unwindctl/unwindctl.8 | 6 | ||||
-rw-r--r-- | usr.sbin/unwindctl/unwindctl.c | 28 |
3 files changed, 5 insertions, 38 deletions
diff --git a/usr.sbin/unwindctl/parser.c b/usr.sbin/unwindctl/parser.c index a130de587f7..582c64edadc 100644 --- a/usr.sbin/unwindctl/parser.c +++ b/usr.sbin/unwindctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.6 2019/11/06 14:19:59 florian Exp $ */ +/* $OpenBSD: parser.c,v 1.7 2019/11/27 17:09:12 florian Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -51,13 +51,11 @@ struct token { static const struct token t_main[]; static const struct token t_log[]; static const struct token t_status[]; -static const struct token t_recheck[]; static const struct token t_main[] = { {KEYWORD, "reload", RELOAD, NULL}, {KEYWORD, "status", STATUS, t_status}, {KEYWORD, "log", NONE, t_log}, - {KEYWORD, "recheck", NONE, t_recheck}, {ENDTOKEN, "", NONE, NULL} }; @@ -78,11 +76,6 @@ static const struct token t_status[] = { {ENDTOKEN, "", STATUS, NULL} }; -static const struct token t_recheck[] = { - {KEYWORD, "portal", PORTAL, NULL}, - {ENDTOKEN, "", NONE, NULL} -}; - static const struct token *match_token(const char *, const struct token *, struct parse_result *); static void show_valid_args(const struct token *); diff --git a/usr.sbin/unwindctl/unwindctl.8 b/usr.sbin/unwindctl/unwindctl.8 index b1b26112421..70ce14779f8 100644 --- a/usr.sbin/unwindctl/unwindctl.8 +++ b/usr.sbin/unwindctl/unwindctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: unwindctl.8,v 1.6 2019/11/07 08:38:48 otto Exp $ +.\" $OpenBSD: unwindctl.8,v 1.7 2019/11/27 17:09:12 florian Exp $ .\" .\" Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 7 2019 $ +.Dd $Mdocdate: November 27 2019 $ .Dt UNWINDCTL 8 .Os .Sh NAME @@ -53,8 +53,6 @@ Enable verbose logging. Enable very noisy debug logging. .It Cm reload Reload the configuration file. -.It Cm recheck portal -Run the captive portal detection. .It Cm status Op Cm recursor | dhcp | DoT | forwarder Show a status summary. If one of diff --git a/usr.sbin/unwindctl/unwindctl.c b/usr.sbin/unwindctl/unwindctl.c index 791a3d5fa15..45a8dbc2894 100644 --- a/usr.sbin/unwindctl/unwindctl.c +++ b/usr.sbin/unwindctl/unwindctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwindctl.c,v 1.14 2019/11/25 18:10:42 otto Exp $ */ +/* $OpenBSD: unwindctl.c,v 1.15 2019/11/27 17:09:12 florian Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -39,7 +39,6 @@ #include <unistd.h> #include "unwind.h" -#include "captiveportal.h" #include "frontend.h" #include "resolver.h" #include "parser.h" @@ -142,12 +141,6 @@ main(int argc, char *argv[]) printf("reload request sent.\n"); done = 1; break; - case PORTAL: - imsg_compose(ibuf, IMSG_CTL_RECHECK_CAPTIVEPORTAL, 0, 0, -1, - NULL, 0); - printf("recheck request sent.\n"); - done = 1; - break; case STATUS_RECURSOR: type = UW_RES_RECURSOR; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, @@ -225,30 +218,13 @@ show_status_msg(struct imsg *imsg) static int header, autoconf_forwarders; struct ctl_resolver_info *cri; struct ctl_forwarder_info *cfi; - enum captive_portal_state captive_portal_state; char ifnamebuf[IFNAMSIZ]; char *if_name; - if (imsg->hdr.type != IMSG_CTL_CAPTIVEPORTAL_INFO && !header++) + if (!header++) printf("%8s %16s %s\n", "selected", "type", "status"); switch (imsg->hdr.type) { - case IMSG_CTL_CAPTIVEPORTAL_INFO: - memcpy(&captive_portal_state, imsg->data, - sizeof(captive_portal_state)); - switch (captive_portal_state) { - case PORTAL_UNCHECKED: - case PORTAL_UNKNOWN: - printf("captive portal is %s\n\n", - captive_portal_state_str[captive_portal_state]); - break; - case BEHIND: - case NOT_BEHIND: - printf("%s captive portal\n\n", - captive_portal_state_str[captive_portal_state]); - break; - } - break; case IMSG_CTL_RESOLVER_INFO: cri = imsg->data; printf("%8s %16s %s%s\n", cri->selected ? "*" : " ", |