Error: failed to create socket

Bill Fink yellowdog-general@lists.terrasoftsolutions.com
Mon Sep 8 16:37:01 2003


On Sun, 07 Sep 2003, Charles Trois wrote:

> le 6/09/03 19:25, yellowdog-general-request@lists.terrasoftsolutions.com à
> yellowdog-general-request@lists.terrasoftsolutions.com a écrit :
> 
> > Message: 5
> > Date: Sat, 6 Sep 2003 01:45:07 -0400
> > From: Bill Fink <billfink@mindspring.com>
> > To: YellowDog Linux General <yellowdog-general@lists.terrasoftsolutions.com>
> > Cc: Bill Fink <billfink@mindspring.com>
> > Subject: Re: Error: failed to create socket
> > Reply-To: yellowdog-general@lists.terrasoftsolutions.com
> > 
> > Hi Charles,
> >  
> > This problem sounded familiar.  I believe I've encountered something
> > similar with a different application.
> > 
> > I downloaded speedbundle-1.0.tar.gz, unpacked it and searched for
> > the string "failed to create socket":
> > 
> > gwiz% grep -r 'failed to create socket' speedbundle-1.0
> > speedbundle-1.0/ppp/pppd/plugins/pppoatm.c:             fatal("failed to
> > create socket: %m");
> > 
> > I then edited the pppoatm.c file and searched again for the string
> > "failed to create socket".  This was the relevant section of code:
> > 
> > fd = socket(AF_ATMPVC, SOCK_DGRAM, 0);
> > if (fd < 0)
> > fatal("failed to create socket: %m");
> > 
> > The last argument to socket() is the protocol.  It used to be OK to
> > just pass a 0 for the protocol argument, but the kernel is now more
> > strict about this.  A value of 0 for protocol is actually PF_UNSPEC
> > or protocol family unspecified.
> > 
> > I believe it should be sufficient to just change the protocol argument
> > of 0 to PF_ATMPVC.
> >  
> 
> Alas no; still the same error. Any further ideas?

Sorry.  The only other obvious problem that would cause this that I can
think of is if the kernel module that was supposed to handle the ATMPVC
protocol wasn't loaded for some reason, but I believe you said that you
had it built into the kernel.  I'm also assuming you have CONFIG_ATM and
CONFIG_PPPOATM enabled in your kernel.

						-Bill