|
From: Ulf H. <ul...@us...> - 2001-05-23 14:03:44
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added missing pppd options
The diff of the modified file(s):
--- btd.c 2001/05/23 11:42:59 1.15
+++ btd.c 2001/05/23 14:03:43 1.16
@@ -135,8 +135,8 @@
static unsigned char ms_wins1[35];
static unsigned char ms_wins2[35];
static unsigned char netmask[35];
-static char bd_str[18];
-
+static char remote_bd_str[18];
+static char local_bd_str[18];
=20
static fd_set rfd;
static struct timeval tv;
@@ -436,6 +436,7 @@
struct ip_set *ipset =3D PEER(line).ipset;
char local_ip[20];
=20
+=20=20
if (ipa_available)
show_ipset(ipset, line);
=20=20=20
@@ -463,12 +464,29 @@
/* Use radius ? */
if (ipset->useradius)
{
+ unsigned char local_bd[6];
+=20=20=20=20=20=20
opts[i++] =3D "useradius";
opts[i++] =3D "auth";
opts[i++] =3D "login";
+=20=20=20=20=20=20
+ opts[i++] =3D "localbdaddr";
+
+ read_local_bd(bt_cfd, local_bd);
+=20=20=20=20=20=20=20=20
+ sprintf(local_bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20
+ local_bd[0],=20
+ local_bd[1],=20
+ local_bd[2],=20
+ local_bd[3],=20
+ local_bd[4],=20
+ local_bd[5]);
+=20=20=20=20=20=20
+ opts[i++] =3D local_bd_str;
+
opts[i++] =3D "remotebdaddr";
=20
- sprintf(bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20
+ sprintf(remote_bd_str, "%02x:%02x:%02x:%02x:%02x:%02x",=20
PEER(line).remote_bd[0],=20
PEER(line).remote_bd[1],=20
PEER(line).remote_bd[2],=20
@@ -476,7 +494,7 @@
PEER(line).remote_bd[4],=20
PEER(line).remote_bd[5]);
=20=20=20=20=20=20=20
- opts[i++] =3D bd_str;
+ opts[i++] =3D remote_bd_str;
=20=20=20=20=20=20=20
if (ipset->useradiusip)
{
@@ -495,6 +513,12 @@
/* similar as doing ' echo 1 > /proc/sys/net/ipv4/ip_forward */
opts[i++] =3D "ktune"; /* enables ip_forwarding */
}=20=20
+
+ if (ipset->usingmasq)
+ {
+ pppd_options[i++] =3D "usingmasq";
+ }
+
=20=20=20=20=20
strcpy(local_ip, get_local_ip_address());
/* local/remote ip */
|