~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/06_default_ifname.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Kyle McMartin
  • Date: 2005-02-15 00:51:28 UTC
  • Revision ID: james.westby@ubuntu.com-20050215005128-4cnlxpp3vc3synqq
Tags: 0.3.8-1
* New upstream release.
* This release fixes a crash due to a buffer overflow, caused by
  a missing validation step on EAPOL-Key frames. Receiving malformed
  frames trigger the crash. More information available in the notes:
  http://lists.shmoo.com/pipermail/hostap/2005-February/009465.html
* Fix some badness with the init script. Missed the -B option
  to daemonize wpa_supplicant... pidfile is not currently being used
  as it requires modifying wpa_supplicant.
* patches/
  - 12_ipw_open_aps (closes: #295143)
    + merge patch against driver_ipw to fix association with
      open access points.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 06_default_ifname.dpatch by  <kyle@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
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
 
11
@@ -890,6 +890,11 @@
 
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'",
 
19
+                                  config->iface);
 
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
 
26
@@ -14,6 +14,7 @@
 
27
        int num_prio; /* number of different priorities */
 
28
        int eapol_version;
 
29
        int ap_scan;
 
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 @@
 
38
                return -1;
 
39
        }
 
40
 
 
41
+       /* allow user to override interface on command line, or
 
42
+          specify a default in the configuration file. */
 
43
        if (ifname == NULL) {
 
44
-               usage();
 
45
-               printf("\nInterface name is required.\n");
 
46
-               return -1;
 
47
+               if (wpa_s->conf->iface == NULL) {
 
48
+                       usage();
 
49
+                       printf("\nInterface name is required.\n");
 
50
+                       return -1;
 
51
+               } else {
 
52
+                       /* using default interface */
 
53
+                       ifname = wpa_s->conf->iface;
 
54
+               }
 
55
        }
 
56
        if (strlen(ifname) >= sizeof(wpa_s->ifname)) {
 
57
                printf("Too long interface name '%s'.\n", ifname);