Hi,

Here is a patch for pppoa3 so that you can get the pppoe bridge
activated under FreeBSD
I can't test it as I don't have any DSL connection here.

This should work for people having pppoa3 working and under FreeBSD
(will see later for Net and Open).

It opens a /dev/tap0, if you already use it you can change it
manually in the pppoa3.c
So then you should be able to launch any pppoe client on it and connect.

Any feedback is welcome. 

-- 
Francois Rogler


-- Attached file included as plaintext by Listar --

Index: pppoa3.c
===================================================================
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.30
diff -r1.30 pppoa3.c
32c32
< #ifdef __linux__
---
> #if defined (__FreeBSD__) || defined (__linux__)
68a69
> #ifdef __linux__
70a72
> #endif /* Linux */
1548,1549c1550,1559
<     struct ifreq ifr;
<     int fd, err;
---
>       int fd;
> 
> #if defined (__FreeBSD__)
>       /* NOTE: probably have to check for tap1, 2 ... is it fails on the 1st
>        * Also have to check what means O_SYNC under linux ... probably have
>        * to add an ioctl 
>        */
>       if( (fd = open("/dev/tap0", O_RDWR)) < 0 )
>               return -1;
> #endif /* BSD */
1551,1552c1561,1564
<     if( (fd = open("/dev/net/tun", O_RDWR | O_SYNC)) < 0 )
<        return -1;
---
> #ifdef __linux__
>       {
>               struct ifreq ifr;
>               int fd, err;
1554,1555c1566,1567
<     memset(&ifr, 0, sizeof(ifr));
<     ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
---
>               if( (fd = open("/dev/net/tun", O_RDWR | O_SYNC)) < 0 )
>                       return -1;
1557,1560c1569,1576
<     if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){
<        close(fd);
<        return err;
<     }
---
>               memset(&ifr, 0, sizeof(ifr));
>               ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
> 
>               if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){
>                       close(fd);
>                       return err;
>               }
> #endif /* Linux */
1562c1578
<     return fd;
---
>       return fd;


Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to