summaryrefslogtreecommitdiff
path: root/source3/lib/interface.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-04Have nmbd check all available interfaces for WINS before failingAravind Srinivasan1-2/+5
When nmbd is acting as WINS, it picks the first interface's IP as WINS server's IP. If the first interface's IP is zero, we will just quit (even though we might have other interfaces with valid IPs). This patch makes nmbd look at all interfaces and pick the first interface with a valid IP as the WINS server's IP.
2008-12-03s3: Change sockaddr util function names for consistencyTim Prouty1-6/+6
Also eliminates name conflicts with OneFS system libraries
2008-10-23Fix prototype for set_sockaddr_port.Jelmer Vernooij1-1/+1
2008-10-23Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij1-19/+22
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
2008-08-19Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 ↵Jeremy Allison1-2/+5
address reported by Ted Percival <ted@midg3t.net>. Jeremy. (This used to be commit ab06efccf31fbc899536d2681a2076e6dfd65b9e)
2008-07-02Remove worrying warning message when safe_strcpy tries to copy a pseaudo ↵Jeremy Allison1-1/+1
interface name that's too long. Reported by James Kosin <JKosin@intcomgrp.com>. Jeremy. (This used to be commit 3a7542fd495223c3a504571a52e2d00551fea0e2)
2007-10-25Fix bug in writing names into gencacheJeremy Allison1-8/+0
as well as 2 typos where AF_INET6 was mistypes as AF_INET. JERRY YOU NEED THESE FIXES. Fixes smbclient -L localhost -U% Bugs reported by Kukks (thanks kukks). Jeremy. (This used to be commit f109f82622ca30ae2360e8300152e90b9587ffd8)
2007-10-25Fix resolve name to resolve IPv6 addresses of link-local%ifaddrJeremy Allison1-94/+23
Jeremy. (This used to be commit e6609cab732d5cd5cc9a5ae50aee15147f2ec6ec)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-9/+5
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-19Add test for "struct in6_addr" to the HAVE_IPV6 configure test.Gerald (Jerry) Carter1-2/+2
Also make use of "if defined(HAVE_IPV6)" rather than testing for AF_INET6 since this is not sufficient on HP-UX 11.11 to ensure a working IPv6 implementation. (This used to be commit 620785df4e57b72471ff0315e22e0d2f28a2b1a5)
2007-10-16Fix access control code to be IPv6/v4 protocol independent.Jeremy Allison1-1/+1
Make unix_wild_match() talloc, not pstring based. Next will be name resolution code, and client code. Jeremy. (This used to be commit f6a01b82c5a47957659df08ea84e335dfbba1826)
2007-10-15Move to protocol independent code in most of lib/util_sock.cJeremy Allison1-3/+3
We don't use gethostbyname any more except in one case where we're looking for host aliases (I don't know how to do that with getaddrinfo yet). New function should be getaddrinfo(). Next step will be fixing lib/access.c, and then changing libsmb/namequery.c to cope with IPv6 address returns. Jeremy. (This used to be commit 4a56b697b6adcf095e25895c4a9ba3192ed34124)
2007-10-14Fix one more place for IFF_LOOPBACKVolker Lendecke1-1/+1
(This used to be commit add1294562b76c38d5e471f280ca1167b4d8a93d)
2007-10-13Fix a segfault with an unknown interfaceVolker Lendecke1-1/+7
"interfaces = foo" with "foo" not being a known interface segfaulted for me. (This used to be commit 556c33702ce6d6c7cde43ddfe965c78ebc2963d3)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-185/+459
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10r25508: Reformatting.Jeremy Allison1-55/+69
Jeremy. (This used to be commit b412ba6fb3e526f5cd83e6cabd952ad7c303c346)
2007-10-10r25472: Fix the interfaces code to detect IPv6 interfaces, using theJeremy Allison1-13/+14
new standard getifaddrs() and freeifaddrs() interfaces. Currently we only return IPv4 af_families. Needs fixing for binds to IPv6 but this has to be careful work. Jeremy. (This used to be commit 327875182c9219aeba687e10aaea93546d9a70ea)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r21854: Add gfree_interfaces() to gfree_all().Günther Deschner1-0/+12
Guenther (This used to be commit eb34ebd9e76061417200a286c2831394be04529b)
2007-10-10r17334: Some C++ warningsVolker Lendecke1-1/+1
(This used to be commit 8ae7ed1f3cecbb5285313d17b5f9511e2e622f0b)
2007-10-10r16582: Fix Klocwork #1997 and all generic class of problemsJeremy Allison1-0/+4
where we don't correctly check the return from memdup. Jeremy. (This used to be commit ce14daf51c7ee2f9c68c77f7f4674e6f0e35c9ca)
2007-10-10r5163: Fix bugzilla 2062:Jim McDonough1-1/+6
turn off broadcast for all 390 NICs. (This used to be commit d159a5013e96a1188599a3fa0bff108fa6f6679b)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-2/+2
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r1248: Fix from Nick Wellnhofer <wellnhofer@aevum.de> to preventJeremy Allison1-4/+8
lp_interfaces() list from being corrupted. Jeremy. (This used to be commit c892545960a9c3206b5a1f73e98ea924c802c17c)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-2/+2
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-39/+7
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-11-28merge from APPLIANCE_HEADGerald Carter1-2/+0
(This used to be commit c60aa6c06f376684b6d6d9a2c14305ca9f4657ef)
2001-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-5/+3
and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
2001-11-23Don't initialise static pointers to NULL.Tim Potter1-1/+1
(This used to be commit 039ea0a0b94be2d70164616f448c0e29fed071cf)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-5/+2
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
2001-08-20a bunch of fixes from the sflight to seattleAndrew Tridgell1-1/+1
in particular: - fixed NT status code for a bunch of ops - fixed handling of protocol levels in ms_fnmatch (This used to be commit 3eba9606f71f90bfd9820af26f8676277ed22390)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-03- sorry, forgot to check a pointerSimo Sorce1-3/+5
(This used to be commit 4e0299d4c091bc4a63740f12588675507601e8cd)
2001-07-01"netbios aliases" and "interfaces" options change from P_STRING to P_LISTSimo Sorce1-5/+5
(This used to be commit db36ed1d80fcbee16d0a0b5f226e56961f3bf1ec)
2001-02-15samba/source/nmbd/nmbd.c change remote_machine name to nmbd insteadHerb Lewis1-5/+7
of nmb so we write to same log file that was originally created as log.nmbd samba/source/smbd/server.c change remote_machine name to smbd instead of smb so we write to same log file that was originally created as log.smbd samba/source/lib/interface.c allow binding to all interface IP addresses even if on same subnet. This allows you to specify which IP's you want in interfaces line and use bind interfaces only (This used to be commit 01dfd59712f3730498784d7632da8fe0113d55b6)
2000-11-10Fix from John E. Malmberg <wb8tyw@qsl.net> for -1 return in interfaces scan.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 4d25a53c36ad2c33cc2ecaf1486e18f1536eff95)
2000-04-30we don't need fnmatch.c any moreAndrew Tridgell1-1/+1
(This used to be commit e23f43e7d3d2a068f527baa63a31f7fe4e60e79d)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-229/+223
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-17/+0
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-08-31bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1-1/+1
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
1998-08-30changed the format of the wins.dat file slightly.Andrew Tridgell1-0/+22
It now has a line like this: VERSION 1 251152 the first number is a version #define in nmbd_winsserver.c and will be used if we ever have to change the format again. The second number is a hash of the current interfaces setting. It is used to detect the case where nmbd is restarted on a machine after the IP of the machine has changed (or the interfaces list has changed in any way). When that happens we need to discard the old wins.dat cache or you end up with chaos. This has bitten quite a few people, they find that when they move a machine it continues using the old IP for some things for the next week until the wins entries time out! I've checked, and the old nmbd can handle the new format, although it does spit out a spurious error message about the VERSION line. So users can safely run 2.0alpha then switch back to 1.9.18 without problems. (This used to be commit c4a8cdc60a5b01894ab2456e77b6d89d4c16a088)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-191/+36
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-04-13Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1-1/+1
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-1/+1
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1998-01-07includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.Jeremy Allison1-1/+5
interface.c: Added netmask fix. nmbd_nameregister.c: Fixed unitialised variable warnings. nmbd_winsproxy.c: Fixed unitialised variable warnings. nmbd_winsserver.c: Fixed DEC warnings. print_svid.c: Fixed DEC warnings. printing.c: Added LPRng fixes. Jeremy. (This used to be commit 28aff043c4a3693a0c20e87c7ce11eb4bf285b78)
1997-12-29avoid the ~ operator in netmask operations as apparently it causesAndrew Tridgell1-33/+55
problems on some systems (eg. freeBSD 2.2.2). I'm surprised by this but the change looks harmless. Patch from fred@datalync.com (This used to be commit ae8151330deafb7abc5aa604e7c8c0b762e3aa20)
1997-12-23Fixes to compile under OpenBSD from "Todd T. Fries" <toddf@acm.org>Jeremy Allison1-1/+1
Jeremy. (This used to be commit 3c9292505914e2119fa7b1973c9fbbe1742262b2)