diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-11 21:29:54 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-11 21:29:54 +0000 |
commit | 493de6d636415067a91040edc8b5ec0c25b6b112 (patch) | |
tree | b3b45fc15d051a443a58d78057cd1fa6634ed0ae | |
parent | 7a460f83f4eea2ac39b9bd813836ca90ddd83292 (diff) |
There is no need to support interface em0:<IP> anymore. Remove most of the
code the rest will be reused somehow.
-rw-r--r-- | usr.sbin/ospf6d/kroute.c | 10 | ||||
-rw-r--r-- | usr.sbin/ospf6d/ospf6d.h | 4 | ||||
-rw-r--r-- | usr.sbin/ospf6d/parse.y | 24 |
3 files changed, 7 insertions, 31 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c index fe917a6cc2e..8815674e464 100644 --- a/usr.sbin/ospf6d/kroute.c +++ b/usr.sbin/ospf6d/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.2 2007/10/10 14:06:03 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.3 2007/10/11 21:29:53 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -658,7 +658,7 @@ kif_find(u_short ifindex) } struct kif * -kif_findname(char *ifname, struct in6_addr *addr, struct kif_addr **kap) +kif_findname(char *ifname, struct kif_addr **kap) { struct kif_node *kif; struct kif_addr *ka; @@ -666,12 +666,6 @@ kif_findname(char *ifname, struct in6_addr *addr, struct kif_addr **kap) RB_FOREACH(kif, kif_tree, &kit) if (!strcmp(ifname, kif->k.ifname)) { ka = TAILQ_FIRST(&kif->addrs); - if (!IN6_IS_ADDR_UNSPECIFIED(addr)) { - TAILQ_FOREACH(ka, &kif->addrs, entry) { - if (IN6_ARE_ADDR_EQUAL(addr, &ka->addr)) - break; - } - } if (kap != NULL) *kap = ka; return (&kif->k); diff --git a/usr.sbin/ospf6d/ospf6d.h b/usr.sbin/ospf6d/ospf6d.h index cb7fe0ade23..bbc747b10d8 100644 --- a/usr.sbin/ospf6d/ospf6d.h +++ b/usr.sbin/ospf6d/ospf6d.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6d.h,v 1.7 2007/10/11 21:25:37 claudio Exp $ */ +/* $OpenBSD: ospf6d.h,v 1.8 2007/10/11 21:29:53 claudio Exp $ */ /* * Copyright (c) 2004, 2007 Esben Norby <norby@openbsd.org> @@ -583,7 +583,7 @@ void kr_fib_decouple(void); void kr_dispatch_msg(int, short, void *); void kr_show_route(struct imsg *); void kr_ifinfo(char *, pid_t); -struct kif *kif_findname(char *, struct in6_addr *, struct kif_addr **); +struct kif *kif_findname(char *, struct kif_addr **); void kr_reload(void); u_int8_t mask2prefixlen(in_addr_t); diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y index 79abf355f27..1a0b409dff0 100644 --- a/usr.sbin/ospf6d/parse.y +++ b/usr.sbin/ospf6d/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.4 2007/10/11 19:02:47 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.5 2007/10/11 21:29:53 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -446,32 +446,14 @@ areaoptsl : interface interface : INTERFACE STRING { struct kif *kif; struct kif_addr *ka = NULL; - char *s; - struct in6_addr addr; - - s = strchr($2, ':'); - if (s) { - *s++ = '\0'; - if (inet_pton(AF_INET6, s, &addr) == 0) { - yyerror( - "error parsing interface address"); - free($2); - YYERROR; - } - } else - bzero(&addr, sizeof(addr)); - if ((kif = kif_findname($2, &addr, &ka)) == NULL) { + if ((kif = kif_findname($2, &ka)) == NULL) { yyerror("unknown interface %s", $2); free($2); YYERROR; } if (ka == NULL) { - if (s) - yyerror("address %s not configured on " - "interface %s", s, $2); - else - yyerror("unnumbered interface %s", $2); + yyerror("unnumbered interface %s", $2); free($2); YYERROR; } |