Date: Fri, 15 Nov 2002 12:28:45 -0800 From: steve@Watt.COM (Steve Watt) To: Archie Cobbs <archie@dellroad.org> Cc: net@FreeBSD.ORG Subject: Re: MPD UDP setup Message-ID: <200211152028.gAFKSjbq030789@wattres.Watt.COM> In-Reply-To: Archie Cobbs <archie@dellroad.org> "Re: MPD UDP setup" (Nov 15, 11:42)
index | next in thread | previous in thread | raw e-mail
On Nov 15, 11:42, Archie Cobbs wrote:
} Subject: Re: MPD UDP setup
} Steve Watt wrote:
} > When I try to start mpd, I get the following in my error
} > log, and don't see anything bound to UDP:3141...
} >
} > Nov 14 23:57:59 wattres mpd: [netremote] can't bind ksocket node: Invalid argument
}
} Are your netgraph modules up-to-date and kernel in sync?
Yup. Did a full upgrade yesterday afternoon, including mpd 3.10.
} What happens when you run ngctl(8) and enter these commands?
} Replace "X.X.X.X" with your globally visible address.
}
} + mkpeer ksocket sock inet/dgram/udp
} + msg sock bind inet/X.X.X.X:3141
That looks like it works. Can't figure out how to delete the
new node, though. Oh, nevermind, it went away with the ngctl
session.
} If that works, then try enabling netgraph debugging in mpd
} and ngctl and compare the messages going back & forth.
Well, they're different, but I'm not good enough friends with
netgraph to figure out what's making it unhappy.
ngctl sayeth:
- - - 8< - - -
+ mkpeer ksocket sock inet/dgram/udp
ngctl: SENDING MESSAGE:
ngctl: SOCKADDR: { fam=32 len=4 addr="." }
ngctl: NG_MESG :
ngctl: vers 2
ngctl: arglen 48
ngctl: flags 0
ngctl: token 1
ngctl: cookie GENERIC (851672668)
ngctl: cmd 2
ngctl: args (48 bytes)
ngctl: 0000: 6b 73 6f 63 6b 65 74 00 00 aa 04 08 dc cd bf bf ksocket.........
ngctl: 0010: 73 6f 63 6b 00 32 06 28 04 00 00 00 9c c5 bf bf sock.2.(........
ngctl: 0020: 69 6e 65 74 2f 64 67 72 61 6d 2f 75 64 70 00 bf inet/dgram/udp..
+ msg sock bind inet/66.93.133.130:3141
ngctl: SENDING MESSAGE:
ngctl: SOCKADDR: { fam=32 len=7 addr="sock" }
ngctl: NG_MESG :
ngctl: vers 2
ngctl: arglen 60
ngctl: flags 0
ngctl: token 2
ngctl: cookie GENERIC (851672668)
ngctl: cmd 13
ngctl: args (60 bytes)
ngctl: 0000: 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ngctl: 0010: 00 00 00 00 62 69 6e 64 00 00 00 00 00 00 00 00 ....bind........
ngctl: 0020: 00 00 00 00 69 6e 65 74 2f 36 36 2e 39 33 2e 31 ....inet/66.93.1
ngctl: 0030: 33 33 2e 31 33 30 3a 33 31 34 31 00 33.130:3141.
ngctl: RECEIVED RESPONSE:
ngctl: SOCKADDR: { fam=32 len=7 addr="sock" }
ngctl: NG_MESG :
ngctl: vers 2
ngctl: arglen 52
ngctl: flags 1
ngctl: token 2
ngctl: cookie GENERIC (851672668)
ngctl: cmd 13
ngctl: args (52 bytes)
ngctl: 0000: 00 00 10 00 00 00 00 00 00 00 00 00 8d 9f 30 38 ..............08
ngctl: 0010: 01 00 00 00 62 69 6e 64 00 00 00 00 00 00 00 00 ....bind........
ngctl: 0020: 00 00 00 00 10 02 0c 45 42 5d 85 82 00 00 00 00 .......EB]......
ngctl: 0030: 00 00 00 00 ....
ngctl: SENDING MESSAGE:
ngctl: SOCKADDR: { fam=32 len=7 addr="sock" }
ngctl: NG_MESG :
ngctl: vers 0
ngctl: arglen 16
ngctl: flags 0
ngctl: token 3
ngctl: cookie KSOCKET (942710669)
ngctl: cmd 1
ngctl: args (16 bytes)
ngctl: 0000: 10 02 0c 45 42 5d 85 82 00 00 00 00 00 00 00 00 ...EB]..........
+ quit
- - - >8 - - -
And mpd says:
- - - 8< - - -
[netremote:netremote] set debug 5
[netremote:netremote] open
[netremote] IFACE: Open event
[netremote] IPCP: Open event
[netremote] IPCP: state change Initial --> Starting
[netremote] IPCP: LayerStart
[netremote:netremote] [netremote] bundle: OPEN event in state CLOSED
[netremote] opening link "netremote"...
[netremote] link: OPEN event
[netremote] LCP: Open event
[netremote] LCP: state change Initial --> Starting
[netremote] LCP: LayerStart
[netremote] device: OPEN event in state DOWN
[netremote] netgraph: SENDING MESSAGE:
[netremote] netgraph: SOCKADDR: { fam=32 len=9 addr="bypass" }
[netremote] netgraph: NG_MESG :
[netremote] netgraph: vers 2
[netremote] netgraph: arglen 48
[netremote] netgraph: flags 0
[netremote] netgraph: token 63
[netremote] netgraph: cookie GENERIC (851672668)
[netremote] netgraph: cmd 2
[netremote] netgraph: args (48 bytes)
[netremote] netgraph: 0000: 6b 73 6f 63 6b 65 74 00 4e 27 07 08 00 00 00 00 ksocket.N'......
[netremote] netgraph: 0010: 6c 69 6e 6b 30 00 00 00 81 e0 06 08 00 00 00 00 link0...........
[netremote] netgraph: 0020: 69 6e 65 74 2f 64 67 72 61 6d 2f 75 64 70 00 00 inet/dgram/udp..
[netremote] netgraph: SENDING MESSAGE:
[netremote] netgraph: SOCKADDR: { fam=32 len=15 addr="bypass.link0" }
[netremote] netgraph: NG_MESG :
[netremote] netgraph: vers 2
[netremote] netgraph: arglen 16
[netremote] netgraph: flags 0
[netremote] netgraph: token 64
[netremote] netgraph: cookie KSOCKET (942710669)
[netremote] netgraph: cmd 1
[netremote] netgraph: args (16 bytes)
[netremote] netgraph: 0000: 00 02 0c 45 42 5d 85 82 00 00 00 00 00 00 00 00 ...EB]..........
[netremote] netgraph: sendto(bypass.link0): Invalid argument
[netremote] can't bind ksocket node: Invalid argument
*** aha! Maybe...
[netremote] netgraph: SENDING MESSAGE:
[netremote] netgraph: SOCKADDR: { fam=32 len=9 addr="bypass" }
[netremote] netgraph: NG_MESG :
[netremote] netgraph: vers 2
[netremote] netgraph: arglen 16
[netremote] netgraph: flags 0
[netremote] netgraph: token 65
[netremote] netgraph: cookie GENERIC (851672668)
[netremote] netgraph: cmd 5
[netremote] netgraph: args (16 bytes)
[netremote] netgraph: 0000: 6c 69 6e 6b 30 00 04 08 6c ef bf bf 10 00 00 00 link0...l.......
[netremote] device is now in state OPENING
[netremote] device: DOWN event in state OPENING
[netremote] device is now in state DOWN
[netremote] link: DOWN event
[netremote] LCP: Down event
[netremote] device: OPEN event in state DOWN
[netremote] pausing 9 seconds before open
[netremote] device is now in state DOWN
close
[netremote] IFACE: Close event
[netremote] IPCP: Close event
[netremote] IPCP: state change Starting --> Initial
[netremote] IPCP: LayerFinish
[netremote:netremote] [netremote] bundle: CLOSE event in state OPENED
[netremote] closing link "netremote"...
[netremote] link: CLOSE event
[netremote] LCP: Close event
[netremote] LCP: state change Starting --> Initial
[netremote] LCP: LayerFinish
[netremote] device: CLOSE event in state DOWN
[netremote] device is now in state DOWN
- - - >8 - - -
My *** aha! is that the sin_len in the sockaddr_in being sent with the
bind request is 0. Lemme go hack and see if that's the problem.
Steve
--
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9"
Internet: steve @ Watt.COM Whois: SW32
Free time? There's no such thing. It just comes in varying prices...
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211152028.gAFKSjbq030789>
