1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

125 Commits

Author SHA1 Message Date
Andrew Tridgell
d09311baa7 r5259: make sure we give the ip of the interface that a name query comes in
on as the first IP in a multi-homed reply
(This used to be commit a9128f6544)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
a75e9a3ee9 r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
be consistent with the function names

- added WINS client support to the NBT server. It will do initial WINS
  registration, and WINS refresh, automatically failing over to
  secondary WINS servers and handling multi-homed servers where we need
  to register multiple IPs.

- added support for multi-homed name query replies, which are
  essential for multi-homed registration as the WINS server will query
  us to ensure we have the names when doing the secondary IPs in
  multi-homed registration
(This used to be commit a1553fa805)
2007-10-10 13:09:34 -05:00
Andrew Tridgell
6348a343de r5222: made the nbtd_self_packet() code more efficient
(This used to be commit 8fe477955d)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
5da52d3209 r5216: don't defend group names against incoming name registration requests
(This used to be commit c5f5e1d401)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
6357adc6ee r5215: register aliases as both client and server node types, so nmblookup can see them
(This used to be commit 3e9788691f)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
32899da200 r5214: added support for "netbios aliases" in smb.conf
(This used to be commit 3270b07539)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
c832e57ceb r5213: do our name broadcast refresh requests as register packets not refresh
packets, as w2k3 and Samba3 do not defend against broadcast name
refresh packets
(This used to be commit 3935b5f7c5)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
1b27d0ce12 r5212: added checking for receiving our own packets as broadcasts
(This used to be commit 290dbd8cdc)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
9eb33fc212 r5211: added broadcast name defense against both registration and refresh
requests
(This used to be commit 9eafe2caca)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
bd22848ad8 r5210: changed server side nbt functions to be prefixed with nbtd_ instead of
nbt_, so as to more clearly separate them from the client code in
libcli/nbt/
(This used to be commit b07a7e35f2)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
dc35a0eb4f r5196: fixed sily bug (that metze found)
(This used to be commit 180f29f9e0)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
906ca09578 r5172: actually bind to the right address for the wildcard interface ....
(This used to be commit 7720d247fe)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
77cdd7c0ff r5171: added support for "bind interfaces only" in nbtd. The solution was to
bind twice on each interface, once using the broadcast address and
once using the specific IP. We then only listen on the wildcard
address if we don't have "bind interface only" set. This also happens
to simplify the code that finds the right interface for an incoming
request.
(This used to be commit b3edf17281)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
9b9c23b19b r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
(This used to be commit 72048e3717)
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
1545d6ecf4 r5147: remove unused var
metze
(This used to be commit 79e79552e6)
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
ca3f70256a r5145: define struct ipv4_addr in misc.idl,
so we can use it in nbt.idl and
get a nicer debug output

metze
(This used to be commit abacbc9192)
2007-10-10 13:09:27 -05:00
Andrew Tridgell
9a70f446fc r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
2e953b967a r5121: added periodic name refresh requests for all our registered names, reporting any
name conflicts
(This used to be commit 69e6a1cd4b)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
aa985bdee0 r5118: added support for node status replies in nbtd. nmblookup -S now works against Samba4.
Also added support for the '*' wildcard name
(This used to be commit 2dd7ccf724)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
5e6082b4b0 r5117: used a composite function to add 4 stage name registration. We send 3
broadcast name registration demands per name per interface at 1 second
intervals, then send a name overwrite request and demand. Any name
conflict replies are reported.
(This used to be commit d656fba6f1)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
414f6c80b2 r5114: the nbtd task can now act as a basic B-node server. It registers its
names on the network and answers name queries. Lots of details are
still missing, but at least this now means you don't need a Samba3
nmbd to use Samba4.

missing pieces include:

 - name registrations should be "shout 3 times, then demand"

 - no WINS server yet

 - no master browser code
(This used to be commit d7d31fdc66)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
37449657a8 r5109: - fixed handling of zero-length subcontexts in the ndr library
- added error checking on socket startup in nbtd
(This used to be commit 5707ebc9ec)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
c7ded5ab0a r5108: the beginnings of a nbtd server for Samba4. Currently just displays
the packets it receives, but it at least shows how the server
structure will work.

To implement it I extended the libcli/nbt/ library to allow for an
incoming packet handler to be registered. That allows the nbt client
library to be used for low level processing of the nbtd server packets.

Other changes:

 - made the socket library always set SO_REUSEADDR when binding to an
   interface, to ensure that restarts of a server don't have to wait
   for a couple of minutes.

 - made the nbt port configurable. Defaults to 137, but other ports
   will be useful for testing.
(This used to be commit 2fedca6adf)
2007-10-10 13:09:23 -05:00