Samba and PPP

Pavel Fedin sonic_amiga at rambler.ru
Sat Feb 15 18:39:17 GMT 2003


 Hello!

 Could anyone of you tell me, how to configure my Samba server to work with
PPP interfaces?
 I have an Amiga machine running Samba v2.0.7. And a Windoze95 PC
connected to it via null-modem cable.
 The problem is: Samba ignores all non-broadcast interfaces. So smbd and
nmbd just do not sit on ppp0 interface, so PC can't connect to Samba. Also
smbclient can't find my PC by name (i have to specify an -I option), because
it ignores ppp0 too.
 After examining a source code, i found the following procedure:
 --- cut ---
static void add_interface(struct in_addr ip, struct in_addr nmask)
{
    struct interface *iface;
    if (iface_find(ip)) {
        DEBUG(3,("not adding duplicate interface %s\n",inet_ntoa(ip)));
        return;
    }

    if (ip_equal(nmask, allones_ip)) {
        DEBUG(3,("not adding non-broadcast interface %s\n",inet_ntoa(ip)));
        return;
    }

    iface = (struct interface *)malloc(sizeof(*iface));
    if (!iface) return;
    
    ZERO_STRUCTPN(iface);

    iface->ip = ip;
    iface->nmask = nmask;
    iface->bcast.s_addr = MKBCADDR(iface->ip.s_addr, iface->nmask.s_addr);

    DLIST_ADD(local_interfaces, iface);

    DEBUG(2,("added interface ip=%s ",inet_ntoa(iface->ip)));
    DEBUG(2,("bcast=%s ",inet_ntoa(iface->bcast)));
    DEBUG(2,("nmask=%s\n",inet_ntoa(iface->nmask)));         
}
 --- cut ---
 My interfaces are:
 --- cut ---
16.System:> ifconfig
lo0: flags=C9<UP,LOOPBACK,RUNNING,NOARP> MTU=1536
        inet 127.0.0.1 netmask FF000000 
        Hardware type: Loopback

eth0: flags=4863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,SANA> MTU=1500
        inet 10.4.20.98 netmask FFFFFFFC broadcast 10.4.20.99
        Hardware type: Ethernet, address: 0:80:ad:c6:be:75

ppp0: flags=40F1<UP,POINTOPOINT,NOTRAILERS,RUNNING,NOARP,SANA> MTU=1500
        inet 192.168.255.254 --> 192.168.255.253 netmask FFFFFFFF 
        Hardware type: PPP

Use "ifconfig -h" for usage.
16.System:> 
 --- cut ---
 PC has IP 192.168.255.253.
 When i try to specify a 255.255.255.252 (FFFFFFFC) netmask for ppp0, Samba
adds ppp0 to the list of interfaces, but the interface just does not pass
broadcasts.
 What's wrong? How to solve my problem?

 Kind regards.



More information about the samba-technical mailing list