1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 06_default_ifname.dpatch by <kyle@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad wpasupplicant-0.3.2/config.c /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/config.c
9
--- wpasupplicant-0.3.2/config.c 2004-12-15 22:13:51.000000000 -0500
10
+++ /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/config.c 2005-01-23 03:18:32.000000000 -0500
12
wpa_printf(MSG_DEBUG, "ctrl_interface_group=%d",
13
(int) config->ctrl_interface_gid);
14
#endif /* CONFIG_CTRL_IFACE */
15
+ } else if (strncmp(pos, "interface=", 10) == 0) {
16
+ free(config->iface);
17
+ config->iface = strdup(pos + 10);
18
+ wpa_printf(MSG_DEBUG, "interface='%s'",
20
} else if (strncmp(pos, "eapol_version=", 14) == 0) {
21
config->eapol_version = atoi(pos + 14);
22
if (config->eapol_version < 1 ||
23
diff -urNad wpasupplicant-0.3.2/config.h /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/config.h
24
--- wpasupplicant-0.3.2/config.h 2004-12-12 20:48:08.000000000 -0500
25
+++ /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/config.h 2005-01-23 03:14:54.000000000 -0500
27
int num_prio; /* number of different priorities */
30
+ char *iface; /* default interface */
31
char *ctrl_interface; /* directory for UNIX domain sockets */
32
#ifdef CONFIG_CTRL_IFACE
33
gid_t ctrl_interface_gid;
34
diff -urNad wpasupplicant-0.3.2/wpa_supplicant.c /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/wpa_supplicant.c
35
--- wpasupplicant-0.3.2/wpa_supplicant.c 2005-01-23 03:13:25.000000000 -0500
36
+++ /tmp/dpep.J8zJWz/wpasupplicant-0.3.2/wpa_supplicant.c 2005-01-23 03:21:59.000000000 -0500
37
@@ -1787,10 +1787,17 @@
41
+ /* allow user to override interface on command line, or
42
+ specify a default in the configuration file. */
45
- printf("\nInterface name is required.\n");
47
+ if (wpa_s->conf->iface == NULL) {
49
+ printf("\nInterface name is required.\n");
52
+ /* using default interface */
53
+ ifname = wpa_s->conf->iface;
56
if (strlen(ifname) >= sizeof(wpa_s->ifname)) {
57
printf("Too long interface name '%s'.\n", ifname);