[mpls-linux-general] Problem no labelspace
Status: Beta
Brought to you by:
jleu
|
From: Georg K. <gk...@gi...> - 2002-11-08 11:05:32
|
Hi all,
today I tried sending of labeled packets between adjancent nodes. But
I was facing the kernel message:
"mpls_rcv: MPLS unicast packet recv on interface w/o a labelspace"
I checked that the labelspace needs to be enabled by the LDP during the
do_mpls_labelspace() function. But do_mpls_labelspace() only works if the
ifindex is set correctly. Anyway the function do_mpls_labelspace() is onl=
y
called during config file reading, but the interface data is get afterwar=
ds
when reading the zebra data (after the config file read is done compeltel=
y).
What do you think? Probably I am doing something wrong in teh config file=
?
For your reference I am attaching the mplsd.conf file as well as the
gdb session output:
----------------------------- mplsd.conf -------------------------
!
! Zebra configuration saved from vty
! 2002/10/23 17:21:36
!
hostname uml-1
password root
enable password root
log file /var/log/zebra/mplsd.log
!
! router zebra
!
mpls ldp
trace address
trace binding
trace debug
trace error
trace event
trace general
trace init
trace label
trace normal
trace notification
trace packet-dump
trace packet
trace path
trace periodic
trace policy
trace route
trace state
trace task
trace timer
!
interface lo
!
interface eth0
! mpls ldp
!
!
interface eth1
mpls ldp
!
!
!interface tunl0
!
!interface gre0
! mpls ldp
!
!
interface dummy0
!
line vty
!
-------------------- end of mplsd.conf ----------------------------------=
-
----------------------------- gdb session ------------------------
test:/home/test/zebra/mplsd# gdb mplsd
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you =
are
welcome to change it and/or distribute copies of it under certain conditi=
ons.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for detail=
s.
This GDB was configured as "i386-linux"...
(gdb) b if_new
Breakpoint 1 at 0x8078847: file if.c, line 57.
(gdb) b do_mpls_labelspace
Breakpoint 2 at 0x804a005: file impl_mpls.c, line 51.
(gdb) run
Starting program: /home/test/zebra-0.93b/mplsd/mplsd
Breakpoint 1, if_new () at if.c:57
57 return ifp;
(gdb) p *ifp
$1 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\0=
', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x0, info =
=3D 0x0, stats
=3D {rx_packets =3D 0,
tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, rx_errors =3D 0, tx=
_errors =3D 0,
rx_dropped =3D 0,
tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed =3D 0, tx_compres=
sed =3D 0,
collisions =3D 0,
rx_length_errors =3D 0, rx_over_errors =3D 0, rx_crc_errors =3D 0, rx=
_frame_errors
=3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) list -
47 } if_master;
48 ^L
49 /* Create new interface structure. */
50 struct interface *
51 if_new ()
52 {
53 struct interface *ifp;
54
55 ifp =3D XMALLOC (MTYPE_IF, sizeof (struct interface));
56 memset (ifp, 0, sizeof (struct interface));
(gdb) n
warning: Cannot insert breakpoint 0:
Cannot access memory at address 0x0
(gdb) n
67 listnode_add (iflist, ifp);
(gdb) bt
#0 if_create () at if.c:67
#1 0x0807905b in interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1,
argv=3D0xbffff898) at if.c:426
#2 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#3 0x08075976 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:2001
#4 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#5 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#6 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) p *ifp
$2 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\0=
', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x0, info =
=3D 0x0, stats
=3D {rx_packets =3D 0,
tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, rx_errors =3D 0, tx=
_errors =3D 0,
rx_dropped =3D 0,
tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed =3D 0, tx_compres=
sed =3D 0,
collisions =3D 0,
rx_length_errors =3D 0, rx_over_errors =3D 0, rx_crc_errors =3D 0, rx=
_frame_errors
=3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) p *iflist
$3 =3D {head =3D 0x0, tail =3D 0x0, count =3D 0, cmp =3D 0, del =3D 0}
(gdb) n
68 ifp->connected =3D list_new ();
(gdb) n
69 ifp->connected->del =3D (void (*) (void *)) connected_free;
(gdb) n
71 if (if_master.if_new_hook)
(gdb) list
66
67 listnode_add (iflist, ifp);
68 ifp->connected =3D list_new ();
69 ifp->connected->del =3D (void (*) (void *)) connected_free;
70
71 if (if_master.if_new_hook)
72 (*if_master.if_new_hook) (ifp);
73
74 return ifp;
75 }
(gdb) n
72 (*if_master.if_new_hook) (ifp);
(gdb) s
mpls_if_new_hook (ifp=3D0x80b1248) at mpls_interface.c:34
34 ifp->info =3D mpls_if_new(ifp);
(gdb) bt
#0 mpls_if_new_hook (ifp=3D0x80b1248) at mpls_interface.c:34
#1 0x0807888e in if_create () at if.c:72
#2 0x0807905b in interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1,
argv=3D0xbffff898) at if.c:426
#3 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#4 0x08075976 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:2001
#5 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#6 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#7 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) list
29 int mpls_if_is_up(struct mpls_interface *mi) {
30 return if_is_up(mi->ifp);
31 }
32
33 int mpls_if_new_hook(struct interface *ifp) {
34 ifp->info =3D mpls_if_new(ifp);
35 return 0;
36 }
37
38 int mpls_if_delete_hook(struct interface *ifp) {
(gdb) p *ifp
$4 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\0=
', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x80b1318,=
info =3D 0x0,
stats =3D {
rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, r=
x_errors =3D 0,
tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
35 return 0;
(gdb) p *ifp
$5 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\0=
', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x80b1318,=
info =3D
0x80b1330, stats =3D {
rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, r=
x_errors =3D 0,
tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
if_create () at if.c:74
74 return ifp;
(gdb) bt
#0 if_create () at if.c:74
#1 0x0807905b in interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1,
argv=3D0xbffff898) at if.c:426
#2 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#3 0x08075976 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:2001
#4 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#5 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#6 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) p *ifp
$6 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\0=
', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x80b1318,=
info =3D
0x80b1330, stats =3D {
rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, r=
x_errors =3D 0,
tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:427
427 strncpy (ifp->name, argv[0], INTERFACE_NAMSIZ);
(gdb) list -
417 "Select an interface to configure\n"
418 "Interface's name\n")
419 {
420 struct interface *ifp;
421
422 ifp =3D if_lookup_by_name (argv[0]);
423
424 if (ifp =3D=3D NULL)
425 {
426 ifp =3D if_create ();
(gdb) list
427 strncpy (ifp->name, argv[0], INTERFACE_NAMSIZ);
428 }
429 vty->index =3D ifp;
430 vty->node =3D INTERFACE_NODE;
431
432 return CMD_SUCCESS;
433 }
434
435 /* For debug purpose. */
436 DEFUN (show_address,
(gdb) p argv[0]
$7 =3D 0x80b0de0 "lo"
(gdb) b if_lookup_by_name
Breakpoint 3 at 0x807896c: file if.c, line 146.
(gdb) c
Continuing.
Breakpoint 3, if_lookup_by_name (name=3D0x80b0de0 "eth0") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) p *node
$8 =3D {next =3D 0x0, prev =3D 0x0, data =3D 0x80b1248}
(gdb) p *ifp
$9 =3D {name =3D "lo", '\0' <repeats 18 times>, ifindex =3D 0, status =3D=
0 '\0', flags
=3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1318,
info =3D 0x80b1330,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
152 return NULL;
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:424
424 if (ifp =3D=3D NULL)
(gdb) n
426 ifp =3D if_create ();
(gdb) n
Breakpoint 1, if_new () at if.c:57
57 return ifp;
(gdb) n
warning: Cannot insert breakpoint 0:
Cannot access memory at address 0x0
(gdb) bt
#0 0x0807885c in if_create () at if.c:65
#1 0x0807905b in interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1,
argv=3D0xbffff898) at if.c:426
#2 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0e10, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#3 0x08075976 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:2001
#4 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#5 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#6 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) b interface
Breakpoint 4 at 0x8079043: file if.c, line 422.
(gdb) c
Continuing.
Breakpoint 4, interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, arg=
v=3D0xbffff898)
at if.c:422
422 ifp =3D if_lookup_by_name (argv[0]);
(gdb) p *agrv[0]
No symbol "agrv" in current context.
(gdb) p *agrgv[0]
No symbol "agrgv" in current context.
(gdb) p *argv[0]
$10 =3D 101 'e'
(gdb) n
Breakpoint 3, if_lookup_by_name (name=3D0x80b0de0 "eth1") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) p *ifp
$11 =3D {name =3D "lo", '\0' <repeats 18 times>, ifindex =3D 0, status =3D=
0 '\0', flags
=3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1318,
info =3D 0x80b1330,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) p *ifp
$12 =3D {name =3D "eth0", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1418,
info =3D 0x80b1430,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
152 return NULL;
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:424
424 if (ifp =3D=3D NULL)
(gdb) n
426 ifp =3D if_create ();
(gdb) n
Breakpoint 1, if_new () at if.c:57
57 return ifp;
(gdb) n
warning: Cannot insert breakpoint 0:
Cannot access memory at address 0x0
(gdb) n
67 listnode_add (iflist, ifp);
(gdb) n
68 ifp->connected =3D list_new ();
(gdb) p *ifp
$13 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\=
0', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x0, info =
=3D 0x0, stats
=3D {rx_packets =3D 0,
tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, rx_errors =3D 0, tx=
_errors =3D 0,
rx_dropped =3D 0,
tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed =3D 0, tx_compres=
sed =3D 0,
collisions =3D 0,
rx_length_errors =3D 0, rx_over_errors =3D 0, rx_crc_errors =3D 0, rx=
_frame_errors
=3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
69 ifp->connected->del =3D (void (*) (void *)) connected_free;
(gdb) n
71 if (if_master.if_new_hook)
(gdb) n
72 (*if_master.if_new_hook) (ifp);
(gdb) n
74 return ifp;
(gdb) p *ifp
$14 =3D {name =3D '\0' <repeats 20 times>, ifindex =3D 0, status =3D 0 '\=
0', flags =3D 0,
metric =3D 0, mtu =3D 0,
hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_len =3D 0, =
bandwidth =3D
0, desc =3D 0x0,
distribute_in =3D 0x0, distribute_out =3D 0x0, connected =3D 0x80b1518,=
info =3D
0x80b1530, stats =3D {
rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes =3D 0, r=
x_errors =3D 0,
tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:427
427 strncpy (ifp->name, argv[0], INTERFACE_NAMSIZ);
(gdb) n
429 vty->index =3D ifp;
(gdb) p *ifp
$15 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) p *ifp
$16 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) bt
#0 interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbfff=
f898) at
if.c:429
#1 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#2 0x08075976 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:2001
#3 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#4 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#5 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) n
430 vty->node =3D INTERFACE_NODE;
(gdb) n
432 return CMD_SUCCESS;
(gdb) p *ifp
$17 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
0x080758fc in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x80b0=
aa0,
cmd=3D0x0) at command.c:1960
1960 return CMD_SUCCESS_DAEMON;
(gdb) c
Continuing.
Breakpoint 2, do_mpls_labelspace (mi=3D0x80b1530) at impl_mpls.c:51
51 if (!mi || !mi->ifp->ifindex) {
(gdb) c
Continuing.
ldp_if_new:
ENTER: ldp_cfg_if_set
Breakpoint 3, if_lookup_by_name (name=3D0xbffff7a8 "eth1") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) bt
#0 if_lookup_by_name (name=3D0xbffff7a8 "eth1") at if.c:146
#1 0x08049bf8 in ldp_ifmgr_open_if (ifmgr_handle=3D0x0, name=3D0x80b1640=
"eth1") at
impl_ifmgr.c:54
#2 0x08054dc1 in ldp_cfg_if_set (handle=3D0x80b1020, i=3D0x80b15dc, flag=
=3D3) at
ldp_cfg.c:790
#3 0x0804f518 in ldp_interface_create (mi=3D0x80b1530) at ldp_interface.=
c:40
#4 0x0804def4 in ldp_intf (self=3D0x8095960, vty=3D0x80b0aa0, argc=3D0,
argv=3D0xbffff898) at ldp_vty.c:1049
#5 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0e10, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#6 0x08075936 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:1981
#7 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#8 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#9 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) p *ifp
$18 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
150 return ifp;
(gdb) n
0x08078999 152 return NULL;
(gdb) list -
142 {
143 listnode node;
144 struct interface *ifp;
145
146 for (node =3D listhead (iflist); node; nextnode (node))
147 {
148 ifp =3D getdata (node);
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
150 return ifp;
151 }
(gdb) p
$19 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
ldp_ifmgr_open_if (ifmgr_handle=3D0x0, name=3D0x80b1640 "eth1") at impl_i=
fmgr.c:56
56 return ifh;
(gdb) list -
46 }
47
48 ldp_if_handle ldp_ifmgr_open_if(ldp_ifmgr_handle ifmgr_handle, const c=
har
*name)
49 {
50 ldp_if_handle ifh;
51 char name2[IFNAMSIZ + 1];
52 strncpy(name2,name,IFNAMSIZ);
53
54 ifh =3D if_lookup_by_name(name2);
55
(gdb) p *ifh
$20 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
ldp_cfg_if_set (handle=3D0x80b1020, i=3D0x80b15dc, flag=3D3) at ldp_cfg.c=
:791
791 }
(gdb) list -
781 LDP_ENTER(global->user_data, "ldp_cfg_if_set");
782
783 ldp_lock_get(global->global_lock); /* LOCK */
784
785 if (flag & LDP_CFG_ADD) {
786 if ((iff =3D ldp_if_create()) =3D=3D NULL) {
787 goto ldp_cfg_if_set_end;
788 }
789 if (ldp_if_handle_verify(global->ifmgr_handle, i->handle) =3D=3D =
LDP_FALSE)
{
790 i->handle =3D ldp_ifmgr_open_if(global->ifmgr_handle, i->name);
(gdb) list
791 }
792 iff->handle =3D i->handle;
793 i->index =3D iff->index;
794 strncpy(iff->name, i->name, LDP_MAX_IF_NAME);
795 _ldp_global_add_if(global, iff);
796 } else {
797 ldp_global_find_if_index(global, i->index, &iff);
798 }
799
800 if ((iff =3D=3D NULL) ||
(gdb) bt
#0 ldp_cfg_if_set (handle=3D0x80b1020, i=3D0x80b15dc, flag=3D3) at ldp_c=
fg.c:791
#1 0x0804f518 in ldp_interface_create (mi=3D0x80b1530) at ldp_interface.=
c:40
#2 0x0804def4 in ldp_intf (self=3D0x8095960, vty=3D0x80b0aa0, argc=3D0,
argv=3D0xbffff898) at ldp_vty.c:1049
#3 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0e10, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#4 0x08075936 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:1981
#5 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#6 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#7 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) p *i->handle
$21 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
792 iff->handle =3D i->handle;
(gdb) n
793 i->index =3D iff->index;
(gdb) n
794 strncpy(iff->name, i->name, LDP_MAX_IF_NAME);
(gdb) n
795 _ldp_global_add_if(global, iff);
(gdb) n
796 } else {
(gdb) p *i->handle
$22 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) p *iff
$23 =3D {_refcnt =3D 1, _global =3D {lle_next =3D 0x80b1070, lle_prev =3D=
0x80b1070},
hello =3D 0x0,
entity =3D 0x0, hellotime_send_timer =3D 0x0, hellotime_send_timer_dura=
tion =3D 0,
label_space =3D -1,
handle =3D 0x80b1448, index =3D 1, message =3D 0x80b2708, buffer =3D 0x=
80b16e8,
local_source_address =3D {
protocol =3D 0, u =3D {ipv6 =3D '\0' <repeats 15 times>, ipv4 =3D 0}}=
, dest =3D
{_refcnt =3D 0, addr =3D {
protocol =3D 2, u =3D {ipv6 =3D "\002\0\0t", '\0' <s> .......
if_handle =3D 0x0}, name =3D "eth1", '\0' <repeats 11 times>, oper_st=
ate =3D
LDP_DOWN, entity_index =3D 0}
(gdb) n
798 }
(gdb) n
800 if ((iff =3D=3D NULL) ||
(gdb) n
804 if (flag & LDP_CFG_DEL) {
(gdb) n
814 if (flag & LDP_IF_CFG_INDEX) {
(gdb) n
817 if (flag & LDP_IF_CFG_LABEL_SPACE) {
(gdb) p flag
$24 =3D 3
(gdb) n
818 iff->label_space =3D i->label_space;
(gdb) n
820 global->configuration_sequence_number++;
(gdb) n
822 retval =3D LDP_SUCCESS;
(gdb) p *i
$25 =3D {_refcnt =3D 0, _global =3D {lle_next =3D 0x0, lle_prev =3D 0x0},=
hello =3D 0x0,
entity =3D 0x0,
hellotime_send_timer =3D 0x0, hellotime_send_timer_duration =3D 0, labe=
l_space =3D
0, handle =3D 0x80b1448,
index =3D 1, message =3D 0x0, buffer =3D 0x0, local_source_address =3D =
{protocol =3D 0,
u =3D {
ipv6 =3D '\0' <repeats 15 times>, ipv4 =3D 0}}, dest =3D {_refcnt =3D=
0, addr =3D
{protocol =3D 0, u =3D {
ipv6 =3D '\0' <repeats 15 times>, ipv4 =3D 0}}, port =3D 0, if_ha=
ndle =3D 0x0},
name =3D "eth1", '\0' <repeats 11 times>, oper_state =3D 0, entity_inde=
x =3D 0}
(gdb) n
825 ldp_lock_release(global->global_lock); /* UNLOCK */
(gdb) n
827 LDP_EXIT(global->user_data, "ldp_cfg_if_set");
(gdb) n
EXIT: ldp_cfg_if_set
829 return retval;
(gdb) n
ldp_interface_create (mi=3D0x80b1530) at ldp_interface.c:42
42 mi->ldp->entity.sub_index =3D mi->ldp->iff.index;
(gdb) list -
32 void ldp_interface_create(struct mpls_interface *mi) {
33 struct ldp *ldp =3D mi->mpls->ldp;
34
35 mi->ldp->create_on_hold =3D LDP_FALSE;
36
37 strncpy(mi->ldp->iff.name,mi->ifp->name,IFNAMSIZ);
38 mi->ldp->iff.label_space =3D mi->labelspace;
39
40 ldp_cfg_if_set(ldp->h, &mi->ldp->iff, LDP_CFG_ADD |
LDP_IF_CFG_LABEL_SPACE);
41
(gdb) n
43 mi->ldp->entity.entity_type =3D LDP_DIRECT;
(gdb) n
44 mi->ldp->entity.admin_state =3D LDP_DOWN;
(gdb) n
46 ldp_cfg_entity_set(ldp->h, &mi->ldp->entity,
(gdb) p *ldp->h
$26 =3D {outlabel =3D {llh_first =3D 0x80b1020, llh_last =3D 0x80b1020}, =
resource =3D
{llh_first =3D 0x80b1028,
llh_last =3D 0x80b1028}, hop_list =3D {llh_first =3D 0x80b1030, llh_l=
ast =3D
0x80b1030}, inlabel =3D {
llh_first =3D 0x80b1038, llh_last =3D 0x80b1038}, session =3D {llh_fi=
rst =3D
0x80b1040,
llh_last =3D 0x80b1040}, tunnel =3D {llh_first =3D 0x80b1048, llh_las=
t =3D
0x80b1048}, entity =3D {
llh_first =3D 0x80b1050, llh_last =3D 0x80b1050}, peer =3D {llh_first=
=3D 0x80b1058,
llh_last =3D 0x80b1058}, attr =3D {llh_first =3D 0x80b1060, llh_last =
=3D 0x80b1060},
adj =3D {
llh_first =3D 0x80b1068, llh_last =3D 0x80b1068}, iff =3D {llh_first =
=3D 0x80b1668,
llh_last =3D 0x80b1668}, global_lock =3D 0x80b0e48, user_data =3D 0x8=
0b1008,
addr_tree =3D 0x80b1118,
tree =3D 0x80b1128, nh_tree =3D 0x0, hello_socket =3D 0x80b1138, listen_s=
ocket =3D
0x80b11c0,
timer_handle =3D 0, socket_handle =3D 0, fib_handle =3D 0x80a68f0, ifmg=
r_handle =3D
0x0, mpls_handle =3D 10,
configuration_sequence_number =3D 3, message_identifier =3D 1, lsr_iden=
tifier =3D
{protocol =3D 2, u =3D {
ipv6 =3D "\0\0\0\0=A3\232\r@=A0\n\v\b\230=F8=FF=BF", ipv4 =3D 0}}, =
send_address_messages
=3D LDP_TRUE,
send_lsrid_mapping =3D LDP_TRUE, lsp_control_mode =3D LDP_CONTROL_ORDER=
ED,
label_retention_mode =3D LDP_RETENTION_LIBERAL, lsp_repair_mode =3D
LDP_REPAIR_GLOBAL,
propagate_release =3D LDP_TRUE, label_merge =3D LDP_TRUE, loop_detectio=
n_mode =3D
LDP_LOOP_NONE,
ttl_less_domain =3D LDP_FALSE, local_tcp_port =3D 646, local_udp_port =3D=
646,
backoff_step =3D 15,
no_route_to_peer_time =3D 10, transport_address =3D {protocol =3D 0, u =
=3D {ipv6 =3D
'\0' <repeats 15 times>,
ipv4 =3D 0}}, keepalive_timer =3D 45, keepalive_interval =3D 15, he=
llotime_timer
=3D 15,
hellotime_interval =3D 5, admin_state =3D LDP_ENABLE}
(gdb) list -
36
37 strncpy(mi->ldp->iff.name,mi->ifp->name,IFNAMSIZ);
38 mi->ldp->iff.label_space =3D mi->labelspace;
39
40 ldp_cfg_if_set(ldp->h, &mi->ldp->iff, LDP_CFG_ADD |
LDP_IF_CFG_LABEL_SPACE);
41
42 mi->ldp->entity.sub_index =3D mi->ldp->iff.index;
43 mi->ldp->entity.entity_type =3D LDP_DIRECT;
44 mi->ldp->entity.admin_state =3D LDP_DOWN;
45
(gdb) list
46 ldp_cfg_entity_set(ldp->h, &mi->ldp->entity,
47 LDP_CFG_ADD | LDP_ENTITY_CFG_SUB_INDEX | LDP_ENTITY_CFG_ADMIN_STATE);
48
49 ldp_cfg_entity_get(ldp->h, &mi->ldp->entity, 0xFFFFFFFF);
50 ldp_cfg_if_get(ldp->h, &mi->ldp->iff, 0xFFFFFFFF);
51
52 ldp_interface_admin_state_finish(mi);
53 }
54
55 void ldp_interface_delete(struct mpls_interface *mi) {
(gdb) p *mi->ldp->entity
Structure has no component named operator*.
(gdb) p mi->ldp->entity
$27 =3D {_refcnt =3D 0, _global =3D {lle_next =3D 0x0, lle_prev =3D 0x0},=
session_root =3D
{llh_first =3D 0x0,
llh_last =3D 0x0}, adj_root =3D {llh_first =3D 0x0, llh_last =3D 0x0}=
, entity_type =3D
LDP_DIRECT, p =3D {
peer =3D 0x0, iff =3D 0x0}, state =3D LDP_STATE_NONE, inherit_flag =3D=
962,
require_hop_count =3D LDP_FALSE, sub_index =3D 1, index =3D 0, transpor=
t_address =3D
{protocol =3D 0, u =3D {
ipv6 =3D '\0' <repeats 15 times>, ipv4 =3D 0}}, protocol_version =3D=
1 '\001',
remote_tcp_port =3D 646,
remote_udp_port =3D 646, max_pdu =3D 4096, keepalive_timer =3D 45,
keepalive_interval =3D 15,
hellotime_timer =3D 15, hellotime_interval =3D 5, session_setup_count =3D=
0,
session_backoff_timer =3D 10,
label_distribution_mode =3D LDP_DISTRIBUTION_UNSOLICITED, path_vector_l=
imit =3D 10
'\n',
hop_count_limit =3D 30 '\036', label_request_count =3D 0 '\0', label_re=
quest_timer
=3D 30,
loop_detection_mode =3D LDP_LOOP_NONE, keepalive_send_timer =3D 0x0,
keepalive_recv_timer =3D 0x0,
admin_state =3D LDP_DISABLE, remote_in_ttl_less_domain =3D LDP_FALSE,
request_retry =3D LDP_TRUE,
mesg_tx =3D 0, mesg_rx =3D 0, adj_count =3D 0}
(gdb) p *mi
$28 =3D {mpls =3D 0x80b0e20, ifp =3D 0x80b1448, labelspace =3D 0, connect=
ed =3D 0x0, ldp =3D
0x80b1548}
(gdb) p *mi->ifp
$29 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
ENTER: ldp_cfg_entity_set
PRT: ldp_cfg_entity_set: entity not ready
EXIT: ldp_cfg_entity_set
49 ldp_cfg_entity_get(ldp->h, &mi->ldp->entity, 0xFFFFFFFF);
(gdb) p *mi->ifp
$30 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
ENTER: ldp_cfg_entity_get
EXIT: ldp_cfg_entity_get
50 ldp_cfg_if_get(ldp->h, &mi->ldp->iff, 0xFFFFFFFF);
(gdb) n
ENTER: ldp_cfg_if_get
EXIT: ldp_cfg_if_get
52 ldp_interface_admin_state_finish(mi);
(gdb) p *mi->ifp
$31 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
ldp_intf (self=3D0x8095960, vty=3D0x80b0aa0, argc=3D0, argv=3D0xbffff898)=
at
ldp_vty.c:1050
1050 } else {
(gdb) bt
#0 ldp_intf (self=3D0x8095960, vty=3D0x80b0aa0, argc=3D0, argv=3D0xbffff=
898) at
ldp_vty.c:1050
#1 0x080758cd in cmd_execute_command_strict (vline=3D0x80b0e10, vty=3D0x=
80b0aa0,
cmd=3D0x0)
at command.c:1963
#2 0x08075936 in config_from_file (vty=3D0x80b0aa0, fp=3D0x80b0930) at
command.c:1981
#3 0x08072828 in vty_read_file (confp=3D0x80b0930) at vty.c:2079
#4 0x08072c82 in vty_read_config (config_file=3D0x0, config_current_dir=3D=
0x8095180
"mplsd.conf",
config_default_dir=3D0x809518b "/etc/zebra/mplsd.conf") at vty.c:2266
#5 0x0804c1ba in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:206
(gdb) list -
1040 /* user is trying to create a new LDP interface */
1041 do_mpls_labelspace(mi);
1042 mi->ldp =3D ldp_if_new(mi);
1043 }
1044
1045 /* if the global LDP has been created, go ahead and tell LDP about=
it
1046 * otherwise just mark the interface as "on hold"
1047 */
1048 if (mpls->ldp) {
1049 ldp_interface_create(mi);
(gdb) list
1050 } else {
1051 mi->ldp->create_on_hold =3D LDP_TRUE;
1052 }
1053
1054 vty->node =3D MPLS_LDP_IF_NODE;
1055
1056 return CMD_SUCCESS;
1057 }
1058
1059 DEFUN(no_ldp_intf,
(gdb) n
1054 vty->node =3D MPLS_LDP_IF_NODE;
(gdb) n
1056 return CMD_SUCCESS;
(gdb) p *mi->ifp
$32 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
0x080758fc in cmd_execute_command_strict (vline=3D0x80b0e10, vty=3D0x80b0=
aa0,
cmd=3D0x0) at command.c:1960
1960 return CMD_SUCCESS_DAEMON;
(gdb) c
Continuing.
Breakpoint 4, interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, arg=
v=3D0xbffff898)
at if.c:422
422 ifp =3D if_lookup_by_name (argv[0]);
(gdb) n
Breakpoint 3, if_lookup_by_name (name=3D0x80b0de0 "dummy0") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
152 return NULL;
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:424
424 if (ifp =3D=3D NULL)
(gdb) n
426 ifp =3D if_create ();
(gdb) n
Breakpoint 1, if_new () at if.c:57
57 return ifp;
(gdb) n
warning: Cannot insert breakpoint 0:
Cannot access memory at address 0x0
(gdb) n
67 listnode_add (iflist, ifp);
(gdb) n
68 ifp->connected =3D list_new ();
(gdb) n
69 ifp->connected->del =3D (void (*) (void *)) connected_free;
(gdb) n
71 if (if_master.if_new_hook)
(gdb) n
72 (*if_master.if_new_hook) (ifp);
(gdb) n
74 return ifp;
(gdb) n
interface (self=3D0x8096680, vty=3D0x80b0aa0, argc=3D1, argv=3D0xbffff898=
) at if.c:427
427 strncpy (ifp->name, argv[0], INTERFACE_NAMSIZ);
(gdb) n
429 vty->index =3D ifp;
(gdb) p *argv[0]
$33 =3D 100 'd'
(gdb) p argv[0]
$34 =3D 0x80b0de0 "dummy0"
(gdb) n
430 vty->node =3D INTERFACE_NODE;
(gdb) n
432 return CMD_SUCCESS;
(gdb) n
0x080758fc in cmd_execute_command_strict (vline=3D0x80b0db0, vty=3D0x80b0=
aa0,
cmd=3D0x0) at command.c:1960
1960 return CMD_SUCCESS_DAEMON;
(gdb) c
Continuing.
2002/11/08 10:25:35 MPLS: MPLSd (0.93b) starts
Breakpoint 3, if_lookup_by_name (name=3D0xbffff8a8 "lo") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) c
Continuing.
2002/11/08 10:25:36 MPLS: interface add lo index 1 flags 73 metric 1 mtu =
16436
2002/11/08 10:25:36 MPLS: address add 127.0.0.1 to interface lo
ENTER: _ldp_global_ifmgr_callback
EXIT: _ldp_global_ifmgr_callback
Breakpoint 3, if_lookup_by_name (name=3D0xbffff8a8 "eth0") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) bt
#0 if_lookup_by_name (name=3D0xbffff8a8 "eth0") at if.c:146
#1 0x0807de30 in zebra_interface_add_read (s=3D0x80ae870) at zclient.c:5=
91
#2 0x0804b384 in mpls_interface_add (command=3D1, zclient=3D0x80ae818, l=
ength=3D50)
at mpls_zebra.c:43
#3 0x0807e2a2 in zclient_read (thread=3D0xbffff9e4) at zclient.c:867
#4 0x080787a2 in thread_call (thread=3D0xbffff9e4) at thread.c:647
#5 0x0804c229 in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:224
(gdb) n
148 ifp =3D getdata (node);
(gdb) c
Continuing.
2002/11/08 10:26:03 MPLS: interface add eth0 index 2 flags 4163 metric 1 =
mtu
1500
2002/11/08 10:26:03 MPLS: address add 192.10.13.163 to interface eth0
ENTER: _ldp_global_ifmgr_callback
EXIT: _ldp_global_ifmgr_callback
Breakpoint 3, if_lookup_by_name (name=3D0xbffff8a8 "dummy0") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) c
Continuing.
2002/11/08 10:26:07 MPLS: interface add dummy0 index 3 flags 195 metric 1=
mtu
1500
2002/11/08 10:26:07 MPLS: address add 10.10.9.100 to interface dummy0
ENTER: _ldp_global_ifmgr_callback
EXIT: _ldp_global_ifmgr_callback
Breakpoint 3, if_lookup_by_name (name=3D0xbffff8a8 "eth1") at if.c:146
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
146 for (node =3D listhead (iflist); node; nextnode (node))
(gdb) n
148 ifp =3D getdata (node);
(gdb) bt
#0 if_lookup_by_name (name=3D0xbffff8a8 "eth1") at if.c:148
#1 0x0807de30 in zebra_interface_add_read (s=3D0x80ae870) at zclient.c:5=
91
#2 0x0804b384 in mpls_interface_add (command=3D1, zclient=3D0x80ae818, l=
ength=3D50)
at mpls_zebra.c:43
#3 0x0807e2a2 in zclient_read (thread=3D0xbffff9e4) at zclient.c:867
#4 0x080787a2 in thread_call (thread=3D0xbffff9e4) at thread.c:647
#5 0x0804c229 in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:224
(gdb) n
149 if (strncmp (name, ifp->name, sizeof ifp->name) =3D=3D 0)
(gdb) n
150 return ifp;
(gdb) n
0x08078999 152 return NULL;
(gdb) n
zebra_interface_add_read (s=3D0x80ae870) at zclient.c:594
594 if (! ifp)
(gdb) list -
584 struct interface *ifp;
585 u_char ifname_tmp[INTERFACE_NAMSIZ];
586
587 /* Read interface name. */
588 stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
589
590 /* Lookup this by interface name. */
591 ifp =3D if_lookup_by_name (ifname_tmp);
592
593 /* If such interface does not exist, make new one. */
(gdb) n
601 ifp->ifindex =3D stream_getl (s);
(gdb) p *ifp
$35 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 0, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) n
604 ifp->flags =3D stream_getl (s);
(gdb) p *ifp
$36 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 4, status =
=3D 0 '\0',
flags =3D 0, metric =3D 0,
mtu =3D 0, hw_type =3D 0, hw_addr =3D '\0' <repeats 19 times>, hw_addr_=
len =3D 0,
bandwidth =3D 0,
desc =3D 0x0, distribute_in =3D 0x0, distribute_out =3D 0x0, connected =
=3D 0x80b1518,
info =3D 0x80b1530,
stats =3D {rx_packets =3D 0, tx_packets =3D 0, rx_bytes =3D 0, tx_bytes=
=3D 0, rx_errors
=3D 0, tx_errors =3D 0,
rx_dropped =3D 0, tx_dropped =3D 0, rx_multicast =3D 0, rx_compressed=
=3D 0,
tx_compressed =3D 0,
collisions =3D 0, rx_length_errors =3D 0, rx_over_errors =3D 0, rx_cr=
c_errors =3D 0,
rx_frame_errors =3D 0,
rx_fifo_errors =3D 0, rx_missed_errors =3D 0, tx_aborted_errors =3D 0=
,
tx_carrier_errors =3D 0,
tx_fifo_errors =3D 0, tx_heartbeat_errors =3D 0, tx_window_errors =3D=
0}}
(gdb) bt
#0 zebra_interface_add_read (s=3D0x80ae870) at zclient.c:604
#1 0x0804b384 in mpls_interface_add (command=3D1, zclient=3D0x80ae818, l=
ength=3D50)
at mpls_zebra.c:43
#2 0x0807e2a2 in zclient_read (thread=3D0xbffff9e4) at zclient.c:867
#3 0x080787a2 in thread_call (thread=3D0xbffff9e4) at thread.c:647
#4 0x0804c229 in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:224
(gdb) p *s
$37 =3D {next =3D 0x0, data =3D 0x80ae890 "", putp =3D 53, getp =3D 27, e=
ndp =3D 53, size =3D
4096}
(gdb) n
605 ifp->metric =3D stream_getl (s);
(gdb) n
606 ifp->mtu =3D stream_getl (s);
(gdb) n
607 ifp->bandwidth =3D stream_getl (s);
(gdb) n
611 ifp->hw_addr_len =3D stream_getl (s);
(gdb) n
612 if (ifp->hw_addr_len)
(gdb) n
613 stream_get (ifp->hw_addr, s, ifp->hw_addr_len);
(gdb) n
616 return ifp;
(gdb) p *ifp
$38 =3D {name =3D "eth1", '\0' <repeats 16 times>, ifindex =3D 4, status =
=3D 0 '\0',
flags =3D 4099,
metric =3D 1, mtu =3D 1500, hw_type =3D 0, hw_addr =3D "\0\003Gq=D5.", =
'\0' <repeats 13
times>,
hw_addr_len =3D 6, bandwidth =3D 0, desc =3D 0x0, distribute_in =3D 0x0=
,
distribute_out =3D 0x0,
connected =3D 0x80b1518, info =3D 0x80b1530, stats =3D {rx_packets =3D =
0, tx_packets =3D
0, rx_bytes =3D 0,
tx_bytes =3D 0, rx_errors =3D 0, tx_errors =3D 0, rx_dropped =3D 0, t=
x_dropped =3D 0,
rx_multicast =3D 0,
rx_compressed =3D 0, tx_compressed =3D 0, collisions =3D 0, rx_length=
_errors =3D 0,
rx_over_errors =3D 0,
rx_crc_errors =3D 0, rx_frame_errors =3D 0, rx_fifo_errors =3D 0, rx_=
missed_errors
=3D 0,
tx_aborted_errors =3D 0, tx_carrier_errors =3D 0, tx_fifo_errors =3D =
0,
tx_heartbeat_errors =3D 0,
tx_window_errors =3D 0}}
(gdb) bt
#0 zebra_interface_add_read (s=3D0x80ae870) at zclient.c:616
#1 0x0804b384 in mpls_interface_add (command=3D1, zclient=3D0x80ae818, l=
ength=3D50)
at mpls_zebra.c:43
#2 0x0807e2a2 in zclient_read (thread=3D0xbffff9e4) at zclient.c:867
#3 0x080787a2 in thread_call (thread=3D0xbffff9e4) at thread.c:647
#4 0x0804c229 in main (argc=3D1, argv=3D0xbffffab4) at mpls_main.c:224
(gdb) quit
------------------------------------ end of gdb
session -------------------------------------
|