28 lines
499 B
Plaintext
28 lines
499 B
Plaintext
$OpenBSD: patch-src_config_c,v 1.2 2021/01/19 10:50:12 sthen Exp $
|
|
|
|
Index: src/config.c
|
|
--- src/config.c.orig
|
|
+++ src/config.c
|
|
@@ -430,3 +430,21 @@ struct SubnetList *parseSubnetAddress(char *addrstr) {
|
|
|
|
return tmpSubnet;
|
|
}
|
|
+
|
|
+struct vifconfig *
|
|
+config_getinterface(const char *ifname)
|
|
+{
|
|
+ struct vifconfig *vc;
|
|
+
|
|
+ if (vifconf == NULL)
|
|
+ return (NULL);
|
|
+
|
|
+ for (vc = vifconf; vc; vc = vc->next) {
|
|
+ if (strcmp(vc->name, ifname))
|
|
+ continue;
|
|
+
|
|
+ return (vc);
|
|
+ }
|
|
+
|
|
+ return (NULL);
|
|
+}
|