~ubuntu-branches/ubuntu/utopic/wpasupplicant/utopic

« back to all changes in this revision

Viewing changes to src/radius/radius_client.c

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2010-02-27 11:30:53 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100227113053-axxieaw3hmuqbqls
Tags: 0.6.10-2
* Switch to source format 3.0 (quilt), drop quilt build dependency
  and remove '--with quilt' from dh command in debian/rules.
* Fix "FTBFS on kfreebsd-gnu" with addition of 21_kfreebsd.patch.
  Thanks to work by Stefan Lippers-Hollmann and Petr Salinger.
  (Closes: #480572)
* Disable experimental feature CONFIG_IEEE80211W (management frame
  protection) due to it not being supported by any driver but ath9k
  and it generating ioctl errors which cause much concern among users
  for little to no benefit.
* Add traling blank line to debian/NEWS to assist apt-listchanges as
  per lintian advice.
* Cherry pick 30_cfg80211_association_optimisation.patch from upstream
  git. Add cfg80211-specific optimization to avoid silly behavior.

Show diffs side-by-side

added added

removed removed

Lines of Context:
917
917
}
918
918
 
919
919
 
 
920
static int radius_client_disable_pmtu_discovery(int s)
 
921
{
 
922
        int r = -1;
 
923
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
 
924
        /* Turn off Path MTU discovery on IPv4/UDP sockets. */
 
925
        int action = IP_PMTUDISC_DONT;
 
926
        r = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, &action,
 
927
                       sizeof(action));
 
928
        if (r == -1)
 
929
                wpa_printf(MSG_ERROR, "Failed to set IP_MTU_DISCOVER: "
 
930
                           "%s", strerror(errno));
 
931
#endif
 
932
        return r;
 
933
}
 
934
 
 
935
 
920
936
static int radius_client_init_auth(struct radius_client_data *radius)
921
937
{
922
938
        struct hostapd_radius_servers *conf = radius->conf;
925
941
        radius->auth_serv_sock = socket(PF_INET, SOCK_DGRAM, 0);
926
942
        if (radius->auth_serv_sock < 0)
927
943
                perror("socket[PF_INET,SOCK_DGRAM]");
928
 
        else
 
944
        else {
 
945
                radius_client_disable_pmtu_discovery(radius->auth_serv_sock);
929
946
                ok++;
 
947
        }
930
948
 
931
949
#ifdef CONFIG_IPV6
932
950
        radius->auth_serv_sock6 = socket(PF_INET6, SOCK_DGRAM, 0);
975
993
        radius->acct_serv_sock = socket(PF_INET, SOCK_DGRAM, 0);
976
994
        if (radius->acct_serv_sock < 0)
977
995
                perror("socket[PF_INET,SOCK_DGRAM]");
978
 
        else
 
996
        else {
 
997
                radius_client_disable_pmtu_discovery(radius->acct_serv_sock);
979
998
                ok++;
 
999
        }
980
1000
 
981
1001
#ifdef CONFIG_IPV6
982
1002
        radius->acct_serv_sock6 = socket(PF_INET6, SOCK_DGRAM, 0);
1060
1080
                eloop_unregister_read_sock(radius->auth_serv_sock);
1061
1081
        if (radius->acct_serv_sock >= 0)
1062
1082
                eloop_unregister_read_sock(radius->acct_serv_sock);
 
1083
#ifdef CONFIG_IPV6
 
1084
        if (radius->auth_serv_sock6 >= 0)
 
1085
                eloop_unregister_read_sock(radius->auth_serv_sock6);
 
1086
        if (radius->acct_serv_sock6 >= 0)
 
1087
                eloop_unregister_read_sock(radius->acct_serv_sock6);
 
1088
#endif /* CONFIG_IPV6 */
1063
1089
 
1064
1090
        eloop_cancel_timeout(radius_retry_primary_timer, radius, NULL);
1065
1091