linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pppd don't create ppp-network-device
@ 2004-09-10 12:46 p.boehm
  2004-09-10 16:02 ` Bill Unruh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: p.boehm @ 2004-09-10 12:46 UTC (permalink / raw)
  To: linux-ppp

[-- Attachment #1: Type: text/plain, Size: 3391 bytes --]

Hi,
I'm try to connect to the internet via ppp but it fails because (so I believe)
ppp_generic-module don't create an network-device alias ppp0.

To show that the rest works fine I'll put here the output of pppd/chat from
syslog:

Sep 10 09:55:46 nano pppd[1510]: pppd 2.4.1 started by root, uid 0
Sep 10 09:55:46 nano pppd[1510]: Perms of /dev/ttyS0 are ok, no 'mesg n' neccesary.
Sep 10 09:55:47 nano chat[1511]: abort on (NO CARRIER)
Sep 10 09:55:47 nano chat[1511]: abort on (NO DIALTONE)
Sep 10 09:55:47 nano chat[1511]: abort on (ERROR)
Sep 10 09:55:47 nano chat[1511]: abort on (NO ANSWER)
Sep 10 09:55:47 nano chat[1511]: abort on (Username/Password Incorrect)
Sep 10 09:55:47 nano chat[1511]: send (at^M)
Sep 10 09:55:47 nano chat[1511]: expect (OK)
Sep 10 09:55:48 nano chat[1511]: at^M^M
Sep 10 09:55:48 nano chat[1511]: OK
Sep 10 09:55:48 nano chat[1511]:  -- got it
Sep 10 09:55:48 nano chat[1511]: send (at&d0&c1^M)
Sep 10 09:55:48 nano chat[1511]: expect (OK)
Sep 10 09:55:48 nano chat[1511]: ^M
Sep 10 09:55:48 nano chat[1511]: at&d0&c1^M^M
Sep 10 09:55:48 nano chat[1511]: OK
Sep 10 09:55:48 nano chat[1511]:  -- got it
Sep 10 09:55:48 nano chat[1511]: send (atdt0172229000^M)
Sep 10 09:55:48 nano chat[1511]: expect (name:)
Sep 10 09:55:48 nano chat[1511]: ^M
Sep 10 09:56:02 nano chat[1511]: atdt0172229000^M^M
Sep 10 09:56:02 nano chat[1511]: CONNECT 9600/RLP^M
Sep 10 09:56:03 nano chat[1511]: ^M^M
Sep 10 09:56:03 nano chat[1511]: 491723222009 connected to the D2 Internet Service^M^M
Sep 10 09:56:06 nano chat[1511]: PPP session starting~^?}#@!}!}!} }8}!}$}%\}"}&^?^?^?^?}%}&})
^G#N}'}"}(}"+}"~~^?}#@!}!}"
Sep 10 09:56:09 nano chat[1511]: } }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"a^P~~^?}#@!}!}#} }8}!}$}%
\}"}&^?^?^?^?}%}&})^G#N}'}
Sep 10 09:56:15 nano chat[1511]: "}(}"(}9~~^?}#@!}!}$} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"d
<~~^?}#@!}!}%} }8}!}$}%\}
Sep 10 09:56:21 nano chat[1511]: "}&^?^?^?^?}%}&})^G#N}'}"}(}"-5~~^?}#@!}!}&} }8}!}$}%\}"}&^?^?^?
^?}%}&})^G#N}'}"}(}"g'~~^?}#
Sep 10 09:56:24 nano chat[1511]: @!}!}'} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"..~~^?}#@!}!}(}
}8}!}$}%\}"}&^?^?^?^?}%}&})
Sep 10 09:56:30 nano chat[1511]: ^G#N}'}"}(}"ne~~^?}#@!}!})} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}
(}"'l~~^?}#@!}!}*} }8}!}
Sep 10 09:56:33 nano chat[1511]: alarm
Sep 10 09:56:33 nano chat[1511]: Failed
Sep 10 09:56:33 nano pppd[1510]: Connect script failed
Sep 10 09:56:34 nano pppd[1510]: Exit.

During this session lsmod shows that ppp_generic works:

Module         Size Used by
ppp_async 6160 0 (autoclean) (unused)
ppp_generic  15040  1 (autoclean) (ppp_async)
slhc      4432 0 (autoclean) (ppp_generic)
...

... but I miss some lines like:

Sep 10 09:55:47 nano pppd[1510]: using channel 1
Sep 10 09:55:47 nano pppd[1510]: Using interface ppp0
Sep 10 09:55:47 nano pppd[1510]: Connect: ppp0 <--> /dev/ttyS0

And ifconfig shows that NO ppp-device has been created.

I can see in lsmod that slhc (serial line hook?) is not touched. configuration error?
I think slhc is the bridge between /dev/ttyS0 and ppp_generic to create ppp-network-device, right?

Hope someone have an idea for this...
Unfortunately I can't trace kernel-modules, so I'm not be able to detect the error.

pb

PS: I'm running SuSE 7.3 prof. with patched (last two wellknown kernelbugs) kernel 2.4.10-4GB...

(summary as file attached: ppp-failure.txt)
(See attached file: ppp-failure.txt)

[-- Attachment #2: ppp-failure.txt --]
[-- Type: application/octet-stream, Size: 3523 bytes --]

Build connection
=============

# pppd -d call isp

/etc/ppp/peers/isp:
================

ttyS0 19200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'

/etc/ppp/chat-isp:
===============

ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "Username/Password Incorrect"
"" "at"
OK "at&d0&c1"
OK "atdt0172229000"
"name:" "^Ua"
"word:" "\qa"
"ispts" "\q^Uppp"
"~-^Uppp-~"

part of /var/log/messages during ppp-session:
===================================

Sep 10 09:55:46 nano pppd[1510]: pppd 2.4.1 started by root, uid 0
Sep 10 09:55:46 nano pppd[1510]: Perms of /dev/ttyS0 are ok, no 'mesg n' neccesary.
Sep 10 09:55:47 nano chat[1511]: abort on (NO CARRIER)
Sep 10 09:55:47 nano chat[1511]: abort on (NO DIALTONE)
Sep 10 09:55:47 nano chat[1511]: abort on (ERROR)
Sep 10 09:55:47 nano chat[1511]: abort on (NO ANSWER)
Sep 10 09:55:47 nano chat[1511]: abort on (Username/Password Incorrect)
Sep 10 09:55:47 nano chat[1511]: send (at^M)
Sep 10 09:55:47 nano chat[1511]: expect (OK)
Sep 10 09:55:48 nano chat[1511]: at^M^M
Sep 10 09:55:48 nano chat[1511]: OK
Sep 10 09:55:48 nano chat[1511]:  -- got it 
Sep 10 09:55:48 nano chat[1511]: send (at&d0&c1^M)
Sep 10 09:55:48 nano chat[1511]: expect (OK)
Sep 10 09:55:48 nano chat[1511]: ^M
Sep 10 09:55:48 nano chat[1511]: at&d0&c1^M^M
Sep 10 09:55:48 nano chat[1511]: OK
Sep 10 09:55:48 nano chat[1511]:  -- got it 
Sep 10 09:55:48 nano chat[1511]: send (atdt0172229000^M)
Sep 10 09:55:48 nano chat[1511]: expect (name:)
Sep 10 09:55:48 nano chat[1511]: ^M
Sep 10 09:56:02 nano chat[1511]: atdt0172229000^M^M
Sep 10 09:56:02 nano chat[1511]: CONNECT 9600/RLP^M
Sep 10 09:56:03 nano chat[1511]: ^M^M
Sep 10 09:56:03 nano chat[1511]: 491723222009 connected to the D2 Internet Service^M^M
Sep 10 09:56:06 nano chat[1511]: PPP session starting~^?}#@!}!}!} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"+}"~~^?}#@!}!}"
Sep 10 09:56:09 nano chat[1511]: } }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"a^P~~^?}#@!}!}#} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}
Sep 10 09:56:15 nano chat[1511]: "}(}"(}9~~^?}#@!}!}$} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"d<~~^?}#@!}!}%} }8}!}$}%\}
Sep 10 09:56:21 nano chat[1511]: "}&^?^?^?^?}%}&})^G#N}'}"}(}"-5~~^?}#@!}!}&} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"g'~~^?}#
Sep 10 09:56:24 nano chat[1511]: @!}!}'} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"..~~^?}#@!}!}(} }8}!}$}%\}"}&^?^?^?^?}%}&})
Sep 10 09:56:30 nano chat[1511]: ^G#N}'}"}(}"ne~~^?}#@!}!})} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"'l~~^?}#@!}!}*} }8}!}
Sep 10 09:56:33 nano chat[1511]: alarm
Sep 10 09:56:33 nano chat[1511]: Failed
Sep 10 09:56:33 nano pppd[1510]: Connect script failed
Sep 10 09:56:34 nano pppd[1510]: Exit.

ppp0 Interface: (ifconfig)
===================

no ppp0 Interface found...

ppp Module: (lsmod)
================

ppp_generic
ppp_async
slhc

/etc/ppp/options: (w/o comments)
===========================

#name <host>
#usehostname
noipdefault
ipcp-accept-local
ipcp-accept-remote
#disconnect "chat -- \d+++\d\c OK ath0 OK"
debug
#kdebug n
#noauth
crtscts
lock
modem
#local
#asyncmap  200a0000
asyncmap 0
#default-asyncmap
#mru 542
#mtu <n>
#netmask 255.255.255.0
#nodetach
lcp-echo-interval 30
lcp-echo-failure 4
lcp-max-configure 60
lcp-restart 2
idle 600
#maxfail 3
noipx
#nodefaultroute
#noreplacedefaultroute
#remotename <n>
#proxyarp
#login
#ms-dns 192.168.1.1
#ms-dns 192.168.1.2
#ms-wins 192.168.1.50
#ms-wins 192.168.1.51

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pppd don't create ppp-network-device
  2004-09-10 12:46 pppd don't create ppp-network-device p.boehm
@ 2004-09-10 16:02 ` Bill Unruh
  2004-09-15 14:14 ` p.boehm
  2004-09-15 14:33 ` carlsonj
  2 siblings, 0 replies; 4+ messages in thread
From: Bill Unruh @ 2004-09-10 16:02 UTC (permalink / raw)
  To: linux-ppp

On Fri, 10 Sep 2004 p.boehm@d-trust.net wrote:

> Hi,
> I'm try to connect to the internet via ppp but it fails because (so I believe)
> ppp_generic-module don't create an network-device alias ppp0.

No Your chat script never let go. ppp was never really started.

This is all from chat.

> Sep 10 09:55:47 nano chat[1511]: abort on (NO DIALTONE)
...
> Sep 10 09:56:02 nano chat[1511]: atdt0172229000^M^M
> Sep 10 09:56:02 nano chat[1511]: CONNECT 9600/RLP^M
> Sep 10 09:56:03 nano chat[1511]: ^M^M
> Sep 10 09:56:03 nano chat[1511]: 491723222009 connected to the D2 Internet Service^M^M
> Sep 10 09:56:06 nano chat[1511]: PPP session starting~^?}#@!}!}!} }8}!}$}%\}"}&^?^?^?^?}%}&})

Chat is still reporting. It should not be. I have no idea what you have
in your chat script, but it should end with 

CONNECT '\d\c'

That is the end, Nothing else after that. NOTHING.


> ^G#N}'}"}(}"+}"~~^?}#@!}!}"
> Sep 10 09:56:09 nano chat[1511]: } }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"a^P~~^?}#@!}!}#} }8}!}$}%
> \}"}&^?^?^?^?}%}&})^G#N}'}
> Sep 10 09:56:15 nano chat[1511]: "}(}"(}9~~^?}#@!}!}$} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"d
> <~~^?}#@!}!}%} }8}!}$}%\}
> Sep 10 09:56:21 nano chat[1511]: "}&^?^?^?^?}%}&})^G#N}'}"}(}"-5~~^?}#@!}!}&} }8}!}$}%\}"}&^?^?^?
> ^?}%}&})^G#N}'}"}(}"g'~~^?}#
> Sep 10 09:56:24 nano chat[1511]: @!}!}'} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}(}"..~~^?}#@!}!}(}
> }8}!}$}%\}"}&^?^?^?^?}%}&})
> Sep 10 09:56:30 nano chat[1511]: ^G#N}'}"}(}"ne~~^?}#@!}!})} }8}!}$}%\}"}&^?^?^?^?}%}&})^G#N}'}"}
> (}"'l~~^?}#@!}!}*} }8}!}
> Sep 10 09:56:33 nano chat[1511]: alarm

It is chat which gave up because it did not get the expect string it was
waiting for. Who knows what it is. It is wrong.
ppp was never started.



> Sep 10 09:56:33 nano chat[1511]: Failed
> Sep 10 09:56:33 nano pppd[1510]: Connect script failed
> Sep 10 09:56:34 nano pppd[1510]: Exit.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pppd don't create ppp-network-device
  2004-09-10 12:46 pppd don't create ppp-network-device p.boehm
  2004-09-10 16:02 ` Bill Unruh
@ 2004-09-15 14:14 ` p.boehm
  2004-09-15 14:33 ` carlsonj
  2 siblings, 0 replies; 4+ messages in thread
From: p.boehm @ 2004-09-15 14:14 UTC (permalink / raw)
  To: linux-ppp

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 15394 bytes --]

I ask me why ppp does not create a new ppp-device, although it starts correctly (automatically
loaded into
kernel after start of pppd):

/var/log/messages:
...
Sep 10 09:55:46 nano kernel: PPP generic driver version 2.4.1
...

please see the following part of a strace:

# --- can be ignored --- see further below ...
# getting infos from some ppp-config-files

1206  open("/etc/ppp/options", O_RDONLY) = 4
1206  fstat64(4, {st_dev=makedev(3, 7), st_inoB533, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0,
st_gid=0, st_blksize@96, st_blocks\x16, st_sizey53, st_atime 04/09/11-20:19:08,
st_mtime 04/09/10-16:38:21, st_ctime 04/09/10-16:38:21}) = 0
1206  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
1206  read(4, "# /etc/ppp/options\n# \n# Not ever"..., 4096) = 4096
1206  stat64("/dev/ttyS0", {st_dev=makedev(3, 7), st_ino€07, st_mode=S_IFCHR|0660, st_nlink=1,
st_uid=0, st_gid\x14, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 64),
st_atime 04/09/11-20:07:45, st_mtime 04/09/11-20:18:09, st_ctime 04/02/27-09:03:45}) = 0
1206  stat64("/dev/ttyS0", {st_dev=makedev(3, 7), st_ino€07, st_mode=S_IFCHR|0660, st_nlink=1,
st_uid=0, st_gid\x14, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 64),
st_atime 04/09/11-20:07:45, st_mtime 04/09/11-20:18:09, st_ctime 04/02/27-09:03:45}) = 0
1206  read(4, "erface.\n#mtu <n>\n\n# Set the inte"..., 4096) = 3857
1206  read(4, "", 4096)                 = 0
1206  close(4)                          = 0
1206  munmap(0x40016000, 4096)          = 0
1206  getuid32()                        = 0
1206  brk(0x8087000)                    = 0x8087000
1206  socket(PF_UNIX, SOCK_STREAM, 0)   = 4
1206  connect(4, {sin_family¯_UNIX, path="/var/run/.nscd_socket"}, 110) = 0
1206  write(4, "\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00", 12) = 12
1206  write(4, "\x30\x00", 2)           = 2
1206  read(4, "\x90\xc1\x16\x40\x01\x00\x00\x00\x05\x00\x00\x00\x02\x00"..., 36) = 36
1206  read(4, "\x72\x6f\x6f\x74\x00\x78\x00\x72\x6f\x6f\x74\x00\x2f\x72"..., 28) = 28
1206  close(4)                          = 0
1206  getuid32()                        = 0
1206  setresuid32(0xffffffff, 0, 0xffffffff) = 0
1206  open("/root/.ppprc", O_RDONLY)    = -1 ENOENT (No such file or directory)
1206  setresuid32(0xffffffff, 0, 0xffffffff) = 0
1206  getuid32()                        = 0
1206  setresuid32(0xffffffff, 0, 0xffffffff) = 0
1206  open("/etc/ppp/peers/isp", O_RDONLY) = 4
1206  setresuid32(0xffffffff, 0, 0xffffffff) = 0
1206  fstat64(4, {st_dev=makedev(3, 7), st_ino\x138957, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0,
st_gid=0, st_blksize@96, st_blocks=8, st_sizei, st_atime 04/09/11-20:19:18,
st_mtime 04/09/11-20:19:36, st_ctime 04/09/11-20:19:36}) = 0
1206  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
1206  read(4, "ttyS0 19200 crtscts\nconnect \'/us"..., 4096) = 69
1206  stat64("/dev/ttyS0", {st_dev=makedev(3, 7), st_ino€07, st_mode=S_IFCHR|0660, st_nlink=1,
st_uid=0, st_gid\x14, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 64),
st_atime 04/09/11-20:07:45, st_mtime 04/09/11-20:18:09, st_ctime 04/02/27-09:03:45}) = 0
1206  stat64("/dev/ttyS0", {st_dev=makedev(3, 7), st_ino€07, st_mode=S_IFCHR|0660, st_nlink=1,
st_uid=0, st_gid\x14, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 64),
st_atime 04/09/11-20:07:45, st_mtime 04/09/11-20:18:09, st_ctime 04/02/27-09:03:45}) = 0
1206  stat64("/dev/19200", 0xbfffdd5c)  = -1 ENOENT (No such file or directory)
1206  read(4, "", 4096)                 = 0
1206  close(4)                          = 0
1206  munmap(0x40016000, 4096)          = 0
1206  open("/etc/ppp/options.ttyS0", O_RDONLY) = 4
1206  fstat64(4, {st_dev=makedev(3, 7), st_ino\x106613, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0,
st_gid=0, st_blksize@96, st_blocks=8, st_sizeG0, st_atime 04/09/11-20:19:06,
st_mtime 04/09/10-13:38:22, st_ctime 04/09/10-13:41:08}) = 0
1206  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
1206  read(4, "# If you need to set up multiple"..., 4096) = 470
1206  stat64("/dev/0.0.0.0:192.168.1.44", 0xbfffddcc) = -1 ENOENT (No such file or directory)
1206  read(4, "", 4096)                 = 0
1206  close(4)                          = 0
1206  munmap(0x40016000, 4096)          = 0
1206  geteuid32()                       = 0
1206  uname({sysname="Linux", nodename="nano", release="2.4.10-4GB", version="#1 Thu Jun 17 12:56:02
CEST 2004", machine="i686"}) = 0
)
# --- end of part that can be ignored ---

# ok. let's take a look
# check if /dev/ppp can be accessed ...

1206  open("/dev/ppp", O_RDWR)          = 4
1206  close(4)                          = 0

# ok. it works.

1206  fstat64(0, {st_dev=makedev(3, 7), st_inoy64, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=0,
st_gid=5, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 1), st_atime 04/09/11-20:19:41,
st_mtime 04/09/11-20:19:41, st_ctime 04/09/11-20:01:34}) = 0
1206  fstat64(1, {st_dev=makedev(3, 7), st_inoy64, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=0,
st_gid=5, st_blksize@96, st_blocks=0, st_rdev=makedev(4, 1), st_atime 04/09/11-20:19:41,
st_mtime 04/09/11-20:19:41, st_ctime 04/09/11-20:01:34}) = 0

# open /dev/ppp an getting/setting flags ...

1206  open("/dev/ppp", O_RDWR)          = 4
1206  fcntl64(4, F_GETFL)               = 0x2 (flags O_RDWR)
1206  fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0

# create an IP-Socket ...

1206  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5

# open pppd-Database ...

1206  open("/var/run/pppd.tdb", O_RDWR|O_CREAT, 0644) = 6

# ...and looking for something what I dont't know ... (does you?)

1206  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=4, len=1}) = 0
1206  read(6, "\x54\x44\x42\x20\x66\x69\x6c\x65\x0a\x00\x00\x00\x00\x00"..., 40) = 40
1206  fstat64(6, {st_dev=makedev(3, 7), st_ino\x106973, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0,
st_gid\x16, st_blksize@96, st_blocks\x16, st_size92, st_atime 04/09/11-20:19:41,
st_mtime 04/09/11-20:02:08, st_ctime 04/09/11-20:02:08}) = 0
1206  old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 6, 0) = 0x40016000
1206  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0
1206  getpid()                          = 1206
1206  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1020, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1020, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1206  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1524, len=1}) = 0

# seems that nothing was not found.
# child process to run chat ...

1206  fork()                            = 1207

# some output from chat ...

1207  setsid()                          = 1207
1207  chdir("/")                        = 0
1207  close(0)                          = 0
1207  close(1)                          = 0
1207  close(2)                          = 0
1207  getpid()                          = 1207
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1288, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1288, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1020, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1020, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1288, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1288, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1207  ioctl(0, SNDCTL_TMR_TIMEBASE, 0xbffff108) = -1 EBADF (Bad file descriptor)
1207  socket(PF_UNIX, SOCK_STREAM, 0)   = 0
1207  connect(0, {sin_family¯_UNIX, path="/var/run/.nscd_socket"}, 110) = 0
1207  write(0, "\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00", 12) = 12
1207  write(0, "\x30\x00", 2)           = 2
1207  read(0, "\x90\xc1\x16\x40\x01\x00\x00\x00\x05\x00\x00\x00\x02\x00"..., 36) = 36
1207  read(0, "\x72\x6f\x6f\x74\x00\x78\x00\x72\x6f\x6f\x74\x00\x2f\x72"..., 28) = 28
1207  close(0)                          = 0
1207  brk(0x808a000)                    = 0x808a000
1207  time([1094926781])                = 1094926781
1207  open("/etc/localtime", O_RDONLY)  = 0
1207  fstat64(0, {st_dev=makedev(3, 7), st_ino\x19136, st_mode=S_IFREG|0644, st_nlink=2, st_uid=0,
st_gid=0, st_blksize@96, st_blocks=8, st_sizeƒ7, st_atime 04/09/11-20:19:41,
st_mtime 01/09/20-05:29:16, st_ctime 04/09/11-20:00:41}) = 0
1207  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
1207  read(0, "\x54\x5a\x69\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 4096) = 837
1207  close(0)                          = 0
1207  munmap(0x40018000, 4096)          = 0
1207  getpid()                          = 1207
1207  rt_sigaction(SIGPIPE, {0x40133e20, [], 0x4000000}, {SIG_DFL}, 8) = 0
1207  send(3, "<149>Sep 11 20:19:41 pppd[1207]:"..., 66, 0) = 66
1207  rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1524, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start\x1248, len=1}) = 0
1207  fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start\x1248, len=1}) = 0

# ... and pppd dies. (w/o any errors)

1206  _exit(0)                          = ?


In kernel-config CONFIG_PPP Switches are set (as modules) and will supported by my kernel (out of
CONFIG_PPP_MULTILINK)
Any ideas where the problem could be? Or how I can find it?

Currently I study the ppp_generic sources to understand how it works, and that's my study-results so
far ...

1) loading ppp_generic ...
     int init_module(void)

          /* ----------------- register_chrdev just fills ppp_file-structure -------------------- */

          register_chrdev(108, "ppp",&ppp_fops);

          /* ----------------- no error ----------------------------------------------------------*/

2) wait for ioctl-requests ...
     static int ppp_ioctl(struct inode *inode, struct file *file,
               unsigned int cmd, unsigned long arg)
     {
          struct ppp_file *pf = (struct ppp_file *) file->private_data;
          ...
          if (pf = 0)
               return ppp_unattached_ioctl(pf, file, cmd, arg);
          ...

3) in ppp_unattached_ioctl ...
     static int ppp_unattached_ioctl(struct ppp_file *pf, struct file *file,
                    unsigned int cmd, unsigned long arg)
     {
          int unit, err = -EFAULT;
          struct ppp *ppp;
          struct channel *chan;
          ...

          case PPPIOCNEWUNIT:
          /* Create a new ppp unit */

          /* ----------- a possibility to fly out -------------------------- */

               if (get_user(unit, (int *) arg))
                    break;

          /* ----------- retval would be -EFAULT. but it isn't ------------- */

               ppp = ppp_create_interface(unit, &err);       /* <--- !!! */
               if (ppp = 0)
                    break;
               file->private_data = &ppp->file;
               err = -EFAULT;
               if (put_user(ppp->file.index, (int *) arg))
                    break;
               err = 0;
               break;
          ...
          default:

          /* ----------- no ioctl-request matched -------------------------- */

               err = -ENOTTY;

          /* ----------- retval would be -ENOTTY but it isnt't ------------- */

          } /* case */
          return err;


4) in ppp_create_interface ...

     static struct ppp *ppp_create_interface(int unit, int *retp)
     {
          struct ppp *ppp;
          struct net_device *dev;
          struct list_head *list;
          int last_unit = -1;
          int ret = -EEXIST;
          int i;

          spin_lock(&all_ppp_lock);
          list = &all_ppp_units;
          while ((list = list->next) != &all_ppp_units) {
               ppp = list_entry(list, struct ppp, file.list);
                    if ((unit < 0 && ppp->file.index > last_unit + 1)
                    || (unit >= 0 && unit < ppp->file.index))
                         break;


          /* --------------- 1st possibility to fly out ... --------------------- */

               if (unit = ppp->file.index)
                    goto out;                 /* unit already exists */

          /* --------------- unit does not exists ------------------------------- */


               last_unit = ppp->file.index;
          }
          if (unit < 0)
               unit = last_unit + 1;

          /* Create a new ppp structure and link it before `list'. */
          ret = -ENOMEM;
          ppp = kmalloc(sizeof(struct ppp), GFP_KERNEL);


          /* ---------------- 2nd possibility to fly out ... -------------------- */

          if (ppp = 0)
               goto out;

          /* ---------------- but there's space enough -------------------------- */


          memset(ppp, 0, sizeof(struct ppp));
          dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);


          /* ---------------- 3rd possibility to fly out ... -------------------- */

          if (dev = 0) {
               kfree(ppp);
               goto out;
          }

          /* ---------------- but there's space enough -------------------------- */

          memset(dev, 0, sizeof(struct net_device));

          ppp->file.index = unit;
          ppp->mru = PPP_MRU;
          init_ppp_file(&ppp->file, INTERFACE);
          ppp->file.hdrlen = PPP_HDRLEN - 2;  /* don't count proto bytes */
          for (i = 0; i < NUM_NP; ++i)
               ppp->npmode[i] = NPMODE_PASS;
          INIT_LIST_HEAD(&ppp->channels);
          spin_lock_init(&ppp->rlock);
          spin_lock_init(&ppp->wlock);
     #ifdef CONFIG_PPP_MULTILINK
          ppp->minseq = -1;
          skb_queue_head_init(&ppp->mrq);
     #endif /* CONFIG_PPP_MULTILINK */

          ppp->dev = dev;
          dev->init = ppp_net_init;
          sprintf(dev->name, "ppp%d", unit);
          dev->priv = ppp;
          dev->features |= NETIF_F_DYNALLOC;

          rtnl_lock();
          ret = register_netdevice(dev);
          rtnl_unlock();


          /* ---------   4th possibility to fly out. ------------------ */

          if (ret != 0) {
               printk(KERN_ERR "PPP: couldn't register device (%d)\n", ret);
               kfree(dev);
               kfree(ppp);
               goto out;
          }

          /* ---------   but syslog has never received it ... --------- */


          list_add(&ppp->file.list, list->prev);
     out:
          spin_unlock(&all_ppp_lock);
          *retp = ret;
          if (ret != 0)
               ppp = 0;
          return ppp;
     }


If you compare with trace-output: there is no reason to see why ppp0-device shouldn't be created.
May be I have some important hints not saw ???
Hope someone can help me!

Thanks in advance!
pb

-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pppd don't create ppp-network-device
  2004-09-10 12:46 pppd don't create ppp-network-device p.boehm
  2004-09-10 16:02 ` Bill Unruh
  2004-09-15 14:14 ` p.boehm
@ 2004-09-15 14:33 ` carlsonj
  2 siblings, 0 replies; 4+ messages in thread
From: carlsonj @ 2004-09-15 14:33 UTC (permalink / raw)
  To: linux-ppp

p.boehm@d-trust.net writes:
> I ask me why ppp does not create a new ppp-device, although it starts correctly (automatically
> loaded into
> kernel after start of pppd):

Use the 'debug' option and make sure that either /etc/syslog.conf has
daemon.debug directed to a file, or that you use the 'updetach' option
to send the debug information to your tty.

strace doesn't really record the needed information to debug the
problem.

> 1207  read(0, "\x54\x5a\x69\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 4096) = 837

It seems like the peer said "TZif".  Not sure why, as you've not
included debug information.

> In kernel-config CONFIG_PPP Switches are set (as modules) and will supported by my kernel (out of
> CONFIG_PPP_MULTILINK)
> Any ideas where the problem could be? Or how I can find it?
> 
> Currently I study the ppp_generic sources to understand how it works, and that's my study-results so
> far ...

You shouldn't need to stare at the code to configure a PPP link.  Just
what exactly are you trying to do?

Are you trying to modify pppd's source code or are you trying to set
up a PPP link?

-- 
James Carlson                                 <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-15 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-10 12:46 pppd don't create ppp-network-device p.boehm
2004-09-10 16:02 ` Bill Unruh
2004-09-15 14:14 ` p.boehm
2004-09-15 14:33 ` carlsonj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).