Commit graph

165 commits

Author SHA1 Message Date
cinap_lenrek 232382bfc1 ip/dhcp6d: ignore short and from non-local source packets 2018-06-11 19:32:44 +02:00
cinap_lenrek d497eb2d2f dhcp6d: make constants for message types, check server identifier in request, only recheck ndb every minute 2018-06-10 22:48:51 +02:00
cinap_lenrek a3f3e31b20 dhcp6d: add minimal stateless DHCPv6 server for network boot and DNS configuration 2018-06-10 22:08:57 +02:00
cinap_lenrek 182077ac24 ip/dhcpd: parseip() error handling, make sure client ip is ipv4, add explicit length arguments to lookupname() and lookupserver() 2018-06-03 20:52:10 +02:00
cinap_lenrek 0cf8a0c4a8 ip/ipconfig: use ipmove() instead of memmove() 2018-06-03 20:31:48 +02:00
cinap_lenrek d5c906f515 ip/tftpd: deal with block wrap arround 2018-05-22 01:53:15 +02:00
cinap_lenrek 6e19d19285 separate MSCHAP(v2) and NTLM(v2) authentication
due to linux omiting the final Z(4) in the NTLMv2 reply, and
the need for the windom for LMv2 authentication, here is a new
AuthNTLM ticket request now with length and dom fields.
2018-05-20 22:49:24 +02:00
cinap_lenrek 40f6e00b9c ip/cifsd: limit response data count in TRANS2 for remotebuffersize, avoid empty filename for the root 2018-05-20 03:48:33 +02:00
cinap_lenrek 58aba2a67f cifsd: fix ntlmv2 authentication
in ntlmv2, the client will retry the challenge response trying a bunch
of different domain names assuming the same server challenge. so we have
to make retries work with factotum and the auth server.

also, windows 7 with compatlevel=4 sends all zeros LM response.
2018-05-19 16:40:01 +02:00
cinap_lenrek eb3951bcd4 ppp: set source specific default route regardless of primary flag, set link speed thru new ctl message when -b is specified 2018-05-10 19:36:14 +02:00
cinap_lenrek 87d922589d ip/linklocal: invert the localadm bit from mac address instead of just setting it 2018-05-02 20:34:43 +02:00
cinap_lenrek 2247741fe0 ip/ipconfig: fix exit status for ndbconfig 2018-05-02 00:03:54 +02:00
cinap_lenrek 190c40c9ff ip/ipconfig: populate /net/ndb from v6 router advertisements, configure multiple addresses in ndbconfig()
we now update /net/ndb with the following information gathered
from router advertisements (rfc6106 and plan9 specific options):

- recursive dns servers (option 25, ndb: dns=)
- dns search list (option 31, ndb: dnsdomain=)
- plan9 fileserver (option 250, ndb: fs=)
- plan9 authserver (option 251, ndb: auth=)

note the plan9 specific options can be disabled with the -G flag.

for ndbconfig (-N flag), we now collect all ip addresses in ndb
belonging to the devices mac address and configue them all. v6
addresses are getting added when a link local address exists
or the -6 flag has been specified to automatically configure one.

move the dhcp code in its own dhcp.c file and make symbols static
that are not used across modules.
2018-05-01 23:32:28 +02:00
cinap_lenrek af3fd92789 ip/ppp: remove old struct 2018-04-28 04:39:09 +02:00
cinap_lenrek 691370a08d ip/ipconfig: always refresh ndb/cs and ndb/dns when adding or removing ip addresses 2018-04-19 01:01:39 +02:00
cinap_lenrek 94018b2130 fix parseip() error handling in ipconfig, ppp, tftpfs and dns 2018-04-17 01:34:10 +02:00
cinap_lenrek 93ab48008e ip/ipconfig: use unique ip/ipmask/ipgw values close to match for ndbconfig 2018-04-15 00:07:42 +02:00
cinap_lenrek 780c5dfd1a ip/ipconfig: setup per local address default routes 2018-04-11 22:57:16 +02:00
cinap_lenrek eac7a2b12a ip/gping: icmpv6 support 2018-04-10 20:04:20 +02:00
cinap_lenrek 0272fa04fd ip/traceroute: icmpv6 support 2018-04-10 19:06:34 +02:00
cinap_lenrek 3e60d7127d ip/ping: stop doing clever things with dialstrings, just let cs/dial figure it out 2018-04-10 00:56:50 +02:00
cinap_lenrek dac42bd005 ip/ipconfig: fix v6 ndp code, use source specific default routes 2018-04-08 21:16:29 +02:00
cinap_lenrek 8ce98a0b32 ip/ipconfig: stop spamming the console about router receiving RA's 2018-03-18 07:31:09 +01:00
cinap_lenrek b192800096 ftpfs: no caching by default, add -c flag to enable it (patch by mycroftiv) 2018-02-14 20:35:36 +01:00
cinap_lenrek d2ec488a93 ip/dhcpd: remove old testing code 2018-01-27 23:47:46 +01:00
cinap_lenrek 5054c9795c ip/pptpd: don't mess with ipifc (handled by ppp), slay note gorup on exit 2018-01-22 21:34:39 +01:00
cinap_lenrek b670fc0ac5 ppp: remove left over debug print 2018-01-21 23:56:37 +01:00
cinap_lenrek 98b1f2a75b ppp: mschapv2 support 2018-01-21 22:55:14 +01:00
cinap_lenrek 9d0ba6f162 ip/ipconfig: use 2000::/3 instead of ::/0 for v6 default route
the ::/0 route has the bad side effect of breaking v4 connections
when theres no default route due to v6 mapped v4 addresses. this
might be temporary measure.
2018-01-16 23:27:23 +01:00
cinap_lenrek 12f27944a5 p/ipconfig: don't put automatic link-local address configuration in /net/ndb 2018-01-16 21:37:36 +01:00
cinap_lenrek b85245f5d2 ip/ipconfig: add v6 deault route from router advertisements 2018-01-14 19:33:30 +01:00
cinap_lenrek d682a6cb38 ip/ipconfig: set on-link flag in router advertisement prefix info (fixes windows7) 2018-01-10 18:28:23 +01:00
cinap_lenrek 3b7f73ccff ip/tinc: handle and set ethertype for ipv6 2017-12-21 04:11:02 +01:00
cinap_lenrek 0affe02b61 ip/tinc: handle single byte noop and end-of-option-list tcp options in clampmss() 2017-12-17 20:20:17 +01:00
cinap_lenrek 4a684fc627 6in4: add -m mtu option to specify outer MTU
instead of hardcoding the tunnel interface MTU to 1280,
we calculate the tunnel MTU from the outside MTU, which
can now be specified with the -m mtu option. The deault
outside MTU is 1500 - 8 (PPPoE).
2017-11-18 16:03:44 +01:00
cinap_lenrek daf292ac9d tinc: implement experimental mash peer to peer VPN from http://www.tinc-vpn.org/ 2017-10-31 22:44:25 +01:00
cinap_lenrek 2713779ee6 ip/torrent: avoid requesting same chunks
instead of always just requesting the missing range
of the current piece, remember the workpiece offset
and request sequential chunks from the workpiece.

this avoids double requests of the same ranges when
the peer does not respond with the data immidiately.
2017-05-01 00:01:14 +02:00
cinap_lenrek 1e2d95a803 ip/torrent: exit immidiately when file is complete after verification and not being in seed mode 2017-03-20 19:15:40 +01:00
cinap_lenrek b7c05975f5 ip/torrent: avoid peerid collision using truerand() instead of time(0) 2017-03-20 19:11:03 +01:00
cinap_lenrek 963cfc9a6f merging erik quanstros nupas 2017-03-12 17:15:03 +01:00
aiju 55373a6498 ip/ipconfig: don't null terminate the dhcp string options.
this seems to be an anachronism; few modern clients put the null in and RFC 2132 says clients 'SHOULD NOT' null terminate
2017-02-19 22:53:10 +00:00
cinap_lenrek abda59c7ec ip/gping: fix corruption due to Machine.last pointer not being maintained in pingclean(), cleanup unused stuff 2017-02-19 02:27:42 +01:00
cinap_lenrek 486523bbc5 ip/ipconfig: have to refresh /net/cs, /net/dns after ndbconfig even tho /net/ndb didnt got written 2017-02-06 11:19:45 +01:00
cinap_lenrek f94167ebee ip/ipconfig: don't write /net/ndb when getting config from ndb (-N) 2017-02-02 22:00:51 +01:00
cinap_lenrek a0d4c5e208 make error handling in 9p service loops consistent
when we get eof, stop the loop immidiately and do not
rely on the read to eventually return an error.

when convM2S() fails to decode the message, error out
and stop the loop. there is no point in continuing.
2016-07-24 02:21:32 +02:00
cinap_lenrek a630e17bd7 ip/ipconfig, ip/ppp: preserve preexisting entries when writing /net/ndb
it is now possible to configure additional interfaces (like wifi)
and store the network information while preserving old entries
in /net/ndb. this allows to easily switch from ethernet to wifi
and have dhcp configure dns without having to clear /net/ndb.
2016-05-08 06:05:25 +02:00
cinap_lenrek e93f7885da 6in4: ingress filter multicast and link-local, but allow relay traffic 2016-03-31 23:53:10 +02:00
cinap_lenrek 137533bd69 6in4: allow setting the local IPv4 address with -i flag (thanks k0ga) 2016-03-31 20:35:02 +02:00
cinap_lenrek d094b7faa1 ip/gping: add main pid to pid list for killall() 2016-03-18 08:59:01 +01:00
cinap_lenrek 7f224a8f6d ppp: fix buffer overflow, set correct state after chap negotiation (thanks k0ga)
(ppp->secret comes from factotum and it can have any size)
This patch also sets the correct state after success and
failure cases in chap negotiation (without them the code was
working because it expected the other point to pass to net
phase or due to the timer).
2016-03-15 22:31:03 +01:00