Commit graph

6330 commits

Author SHA1 Message Date
mischief 831291e5dd sdloop(3): import sdloop driver (thanks erik) 2018-08-10 08:08:38 -07:00
23hiro b989e691cf plan9.ini(8) iwlwifi essid/bssid misleading 2018-08-08 18:47:48 +02:00
cinap_lenrek 45ce4de650 nusb/ether: fix ethertype filtering 2018-08-07 23:46:58 +02:00
cinap_lenrek 445fc8e5a7 merge 2018-08-06 23:14:59 +02:00
cinap_lenrek abe463b931 wifi: lilu dallas multirate
now handle the supported rates element properly, only
providing the intersecting set of rates that the bss
advertises and what the driver supports, putting the
basic rates first.

also avoid using usupported rates.
2018-08-06 23:13:23 +02:00
mischief eb1be5b4df devaoe: really fix unit numbering, to be 0-based 2018-08-06 09:41:28 -07:00
mischief 796c41092a devaoe: fix unit numbering for Qdevlinkdir
a side effect of 3c77cd3ae664 changed the unit ordering to start at one, so fix the condition accordingly.
2018-08-06 08:50:40 -07:00
mischief 0c036b4d4a ip(3): document ipifc ipv6 connection and fix delay formatting 2018-08-06 08:47:07 -07:00
cinap_lenrek 209a6b4b55 acme: pass pointer to int type to avoid pointer to int cast warning 2018-08-03 16:53:50 +02:00
spew 4757debd0b acme: add spacesindent mode 2018-08-01 11:14:59 -04:00
cinap_lenrek 2b619dc966 etheriwl: add pci did for WifiLink 5300 (thans senthil) 2018-07-31 18:33:42 +02:00
cinap_lenrek c4dd0f6282 kbdfs: ignore first 16 scancodes (number row) in kbtabctl[] for control key reverse mapping 2018-07-30 20:40:28 +02:00
cinap_lenrek 36abc45f28 vncv: implement extended DesktopSize extension, cleanup 2018-07-30 02:21:28 +02:00
cinap_lenrek da5c0bada7 dc: fix off by one in stack overflow check (thanks BurnZeZ)
BurnZeZ → Found a bug in dc(1)
BurnZeZ → Everything breaks when you fill the stack
BurnZeZ → You have stkptr which crap expects to point to an available member in Blk *stack[STKSZ];
BurnZeZ → stkend = &stack[STKSZ];
BurnZeZ → stkptr is allowed to equal stkend
BurnZeZ → So crap that expects stkptr to be pointing to an available Blk ends up dereferencing past the end of the array
BurnZeZ → term% echo `{seq 1 100} f | dc
BurnZeZ → dc 628283: suicide: sys: trap: fault read addr=0xffffe0000040a618 pc=0x204b1c
2018-07-27 09:31:28 +02:00
cinap_lenrek 6cd83e5d24 audiohda: support Intel Sunrise Point-LP on thinkpad X1 2018-07-26 02:48:00 +02:00
qwx a8644d01c3 add games/dpic and games/todpic 2018-07-25 05:02:46 +02:00
23hiro 416aed9b66 merge 2018-07-24 09:17:11 +02:00
23hiro 469bbab460 spelling 2018-07-24 09:04:50 +02:00
cinap_lenrek d07fb3261f devmouse: produce signed msec timestamp in /dev/mouse, accept unsigned on write 2018-07-23 19:29:15 +02:00
cinap_lenrek 34c7af22c1 libdraw: accept unsigned msec timestamp in /dev/mouse 2018-07-23 19:25:28 +02:00
cinap_lenrek 0431ea242d pc, pc64: look for "RSD PTR " in ACPI reserved memory region from e820 map
nobody passes us the "RSD PTR " address when doing multiboot/kexec
on UEFI systems. so we search for it manually in the ACPI reserved
area as indicated in the e820 memory map.
2018-07-22 21:00:20 +02:00
qwx f4b9f0304d dmid: better fnumber calculation and fix fine tuning for 2nd voice 2018-07-21 05:05:53 +02:00
cinap_lenrek 2d6f9f4700 ssh: fix nil dereference when TERM isnt set and -r is requested 2018-07-18 09:48:45 +02:00
cinap_lenrek ec5227f7f5 merge 2018-07-16 23:55:45 +02:00
cinap_lenrek 00622d4d2b ndb/dns: fix delegation with norecursion (-R flag)
when the question zone is in a delegated area, we still
need to provide the nameservers.
2018-07-16 23:54:23 +02:00
cinap_lenrek 37b560e50f merge 2018-07-16 01:36:35 +02:00
cinap_lenrek 0d7bbda9b9 devmnt: make sure auth chan is on said conection in mntattach() 2018-07-16 01:35:02 +02:00
qwx e7b1c1aad8 doom: use wadfs to expose music lumps
launch wadfs after detecting main wad, exposing GENMIDI and music lumps
under /mnt/wad.  /bin/dmus can then use them directly, and wadfs doesn't
need to be started manually.
2018-07-15 06:31:45 +02:00
23hiro 1a751a5939 cwfs -a option misleading 2018-07-14 20:40:26 +02:00
cinap_lenrek 51b0b0235b bootrc: write fatal error message to fd2 2018-07-14 17:20:49 +02:00
mischief c5559504cd ndb/dnsgetip: report errors when dns resolution fails 2018-07-13 20:44:57 +00:00
qwx 96e511d736 add games/dmid and games/opl3 2018-07-12 09:33:33 +02:00
qwx 1e3790f7b5 wadfs(4): fix typo 2018-07-12 09:25:04 +02:00
aiju d16a96daca pc64: update headers to match pc 2018-07-11 16:05:03 +01:00
aiju 6b0de3de8e pc: fix ugly and partially broken switch() statement 2018-07-11 15:12:24 +01:00
aiju 3a77c01f43 pc kernel: get rid of ugly and partially broken cpuid macros 2018-07-11 14:50:22 +01:00
aiju 911df94e5d asaudit: make error more explicit 2018-07-11 12:23:48 +01:00
cinap_lenrek 83de8c0f5f authsrv: log message when no AES key is found for pak 2018-07-11 10:17:04 +02:00
qwx 4e04e03142 midi: properly skip sysex messages
this fixes playing any midi files containing such messages
example: prince of persia midis from vgmpf wiki
2018-07-10 23:26:17 +02:00
cinap_lenrek 24611cf5ed ndb/cs: add -6 flag for v6 only lookups and "ipv4" control message to toggle v4 lookups. 2018-07-10 19:57:55 +02:00
cinap_lenrek a8a6429204 devip: make il connect fail quickly when theres no route 2018-07-10 09:11:19 +02:00
cinap_lenrek 9898aafa0c devip: don't pad the tag for routing commands (fixes removing routes with < 4 character tags) 2018-07-09 01:32:21 +02:00
Alex Musolino 8fd222c157 upas/smtp: use current login id in absence of -u option (as per man page) 2018-07-08 12:18:06 +09:30
Alex Musolino 259a31e59b upas/smtp: allow remote port to be set to something other than smtp (e.g. ssmtp) 2018-07-08 12:05:42 +09:30
cinap_lenrek e181b7e405 kbdfs: handle mouse control (Kmouse, Kshift button swap) in parallel, bring back ^X form handling 2018-07-07 21:10:38 +02:00
cinap_lenrek cc5d74262c vncs: silence devdraw debug prints 2018-07-07 17:11:51 +02:00
spew 77ca4e0056 ape: fix MAXSIG 2018-07-03 14:41:14 -04:00
spew ede15f38e5 ape: remove getitimer setitimer implemenations 2018-07-03 12:28:05 -04:00
aiju ac891003ea games/mines: add missing checks for UseGhost 2018-07-03 07:22:19 +00:00
spew 2e05af858e ape: improve setitimer 2018-07-01 23:35:23 -04:00
spew 91d0343627 ape: an implemenation of getitimer setitimer 2018-07-01 18:48:12 -04:00
cinap_lenrek 9dc907361c hgfs(4): fix typo (thanks piroko) 2018-06-28 20:14:43 +02:00
cinap_lenrek 899ec4d0b5 ssh: wait for remote channel close (thanks piroko) 2018-06-28 20:10:11 +02:00
23hiro 2f1b8246e2 Persist 'k' command in mothra and add matching -k flag (thanks piroko)
"I sometimes find myself on either slow or data-capped network links where downloading images isn't ideal. Attached is a simple patch to mothra that changes the 'k' command to not only remove already-downloaded images from a page, but also toggle a state such that mothra won't attempt to download images on future visited sites until 'k' is toggled again. This also adds a '-k' flag to mothra which enables the flag at startup." --Jeremy O'Brien<neutral@fastmail.com> on 9fans
2018-06-27 19:20:28 +02:00
cinap_lenrek 902eceee63 ndb/dns: fix encoding of srv record target
the target has to be encoded as a domain name (the individual
name components as separate labels followed by . (empty) label),
not as a literal string.

to disable compression, pass nil dictionary to pname().
2018-06-26 19:30:52 +02:00
qwx deae5c854b mus: fix note volume and channel selection; simplify
- fix overwriting channel 10 with channel 9
- fix using channel volume instead of last volume when setting note
  (fixes d_doom and others)
- remove useless state
2018-06-26 10:35:23 +02:00
mischief 07b237b10c /sys/lib/dist/ndb/common: synchronize root servers and link to root hints source 2018-06-25 22:58:52 +00:00
cinap_lenrek 65e0e1c3e3 merge 2018-06-24 21:54:21 +02:00
cinap_lenrek 8f1eb1ac77 webfs: don't handle unknown status codes as continuations, reset status when handling continuation to avoid infinite loop 2018-06-24 21:52:17 +02:00
qwx 0da9e3a7f5 gba: handle 8bit writes to vram
ignore 8bit writes to obj and oam, and duplicate bits for bg and palette
memory, as per gbatek.

thanks aiju for helping with the implementation.
2018-06-22 14:49:18 +02:00
mischief f554155ed0 stats(8): document -z flag (thanks xcko) 2018-06-22 02:02:46 +00:00
spew 55c122d59f ape: add strnlen 2018-06-21 11:56:37 -04:00
spew 3b376b43af ape: provide bogus chroot implementation 2018-06-20 22:19:37 -04:00
cinap_lenrek 8dd003eb04 devip: fix flush, copy tag when replacing route entry 2018-06-19 21:17:15 +02:00
spew 583c6d269b ape: add some common fields for stat, grp and pwd 2018-06-17 17:38:00 -04:00
cinap_lenrek 0763dd4279 zunq: add sdram driver 2018-06-14 21:54:42 +02:00
cinap_lenrek 4971db9e32 udp: fix udp checksum
we did not apply the special case to store 0xFFFF (-0)
in the checksum field when the checksum calculation
returned zero. we survived this for v4 as RFC768 states:

> If the computed checksum is zero, it is transmitted as
> all ones (the equivalent in one's complement arithmetic).
>
> An all zero transmitted checksum value means that the
> transmitter generated no checksum (for debuging or for
> higher level protocols that don't care).

for ipv6 however, the checksum is not optional and receivers
would drop packets with a zero checksum.
2018-06-14 20:48:21 +02:00
cinap_lenrek 39fb26df70 9pc, 9pc64: make mapalloc() and mapfree() static in memory.c 2018-06-14 20:22:34 +02:00
cinap_lenrek 5c87dfb9d5 merge 2018-06-14 01:12:46 +02:00
cinap_lenrek a9a92cab48 stats: fix crash with -Y fag when window too narrow 2018-06-14 01:10:52 +02:00
cinap_lenrek 4d496b3c7a merge 2018-06-14 00:08:46 +02:00
cinap_lenrek de9141bc6d devip: don't send arp requests from null address
during dhcp, ipconfig assigns the null address :: which makes
ipforme() return Runi for any destination, which can trigger
arp resolution when we attempt to reply. so have v4local()
skip the null address and have sendarp() check the return
status of v4local(), avoing the spurious arp requests.
2018-06-14 00:07:45 +02:00
cinap_lenrek 71ce6f53a4 devip: reject incompatible multicast/interface ip address pairs for ipifcaddmulti() 2018-06-13 18:58:17 +02:00
aiju 21a221129a sysinfo: minor formatting fix 2018-06-13 16:05:31 +01:00
qwx e4b842056c emulators ui: don't drink and code 2018-06-13 14:14:25 +02:00
qwx 09c6120444 emulators ui: add option for fixed factor scaling and bound scale vertically 2018-06-13 14:05:19 +02:00
mischief 382c9ef92c stats: read cputemp as C, set scale max to 100 C 2018-06-13 11:59:14 +00:00
aiju 9fbce3b1b4 games/gb: attempt at fixing sprite priority 2018-06-13 09:52:41 +00:00
aiju 5d202d3456 games/gb: fix mbc5 register addressing (fixes warioland3 gamebreaking bug) 2018-06-13 09:26:55 +00:00
cinap_lenrek 8fdd633d57 devip: fix missing wunlock() for "ipifc not yet bound to device" case, don't create multicast entry on error 2018-06-12 20:31:39 +02:00
cinap_lenrek 55b73cbbbf ip/dhcp6d: don't drink and code 2018-06-12 19:50:04 +02:00
cinap_lenrek b9b6fcd85f ip/dhcp6d: only announce all-dhcp-servers multicast address on interface with link-local address on it 2018-06-12 19:36:31 +02:00
cinap_lenrek fca2c1cb31 /sys/src/mkfile: add libttf 2018-06-12 19:29:38 +02:00
Alex Musolino 1c862bd24e upas/nedmail: marshal(1) options -n and -8 are mutually exclusive 2018-06-12 20:04:16 +09:30
cinap_lenrek 232382bfc1 ip/dhcp6d: ignore short and from non-local source packets 2018-06-11 19:32:44 +02:00
cinap_lenrek 71402b2ea1 devip: fix use after free in ipifcremmulti()
closeconv() calls ipifcremmulti() like:

	while((mp = cv->multi) != nil)
		ipifcremmulti(cv, mp->ma, mp->ia);

so we have to defer freeing the entry after doing:

		if((lifc = iplocalonifc(ifc, ia)) != nil)
			remselfcache(f, ifc, lifc, ma);

which accesses the otherwise free'd ia and ma arguments.
2018-06-11 03:19:42 +02:00
cinap_lenrek 94f6f89ac1 devip: do not icmp reply on multicast destination 2018-06-11 03:14:28 +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 eed90aa0ad kernel: don't cap the minimum sleep time to TK2MS(1) for syssleep()
on HZ 100 systems like pc and pc64, the minium sleep time
was 10ms, which is quite high. the cap isnt really needed
as arch specific timerset() enforces its own limit, but on
a higher resolution.

background:

from Charles Forsyth:

I haven't really got an opinion on it. The 10ms interval was first used on
machines that were much slower.
I thought someone did set HZ to a bigger value, partly to support better
in-kernel timing. I haven't done it because I never had a need for it.
If I were doing (say) protocol implementation in user mode, I'd certainly
reconsider. Sleep itself forces at best ms granularity,
and for some applications that's too big.

initial mail from qwx raising the issue:

> Hello,
>
> I found out recently that sleep(2)'s resolution on 386 and 9front's amd64
> kernel is 10 ms rather than 1 ms.  The reason is that on those kernels,
> HZ is set to 100 rather than say 1000.  In syssleep, we get 1 tich every
> 10 ms.
>
> What is unclear is why.
>
> To paraphrase cinap_lenrek's answer to my question:
>
> In syssleep:
>                 if(ms < TK2MS(1))
>                         ms = TK2MS(1);
>                 tsleep(&up->sleep, return0, 0, ms);
>
> "TK2MS(1)" can be replaced with just "1", and the arch specific
> timerset() routine would do its own capping of the period if it's too
> small for the timer resolution, and make better decisions based on what
> the minimum timer period should be given the latency overhead of the
> given arch's interrupt handling and performance characteristics.
>
> Alternatively, HZ could be raised to 500 or 1000.
>
> It seems it's just trying to prevent excessive context switches and
> interrupts, but it seems somewhat arbitrary.  A ton of syscalls can be
> done in 1 ms, and it's the lowest we can go without changing the unit.
>
>
> What do you think?
>
> Thanks in advance,
>
> qwx
2018-06-10 19:47:21 +02:00
aiju ce9d09a965 libttf: add missing file impl.h 2018-06-09 14:55:32 +00:00
aiju 3b63c5a73f add ttfrender(1) 2018-06-09 14:34:44 +00:00
aiju db71e19005 add libttf 2018-06-09 14:33:19 +00:00
qwx 198f10bb25 snes: fix input botch 2 2018-06-09 07:12:43 +02:00
qwx 54ac2c2871 snes: fix input botch 2018-06-09 07:08:43 +02:00
mischief 9a7b1b57b6 mklib: add %.acid target 2018-06-08 16:48:31 +00:00
mischief 59994e1beb avl(2): add avlmin/avlmax in synopsis 2018-06-08 16:37:39 +00:00
cinap_lenrek ff1a1e63a8 getuser(2): add source or sysname() 2018-06-03 23:46:47 +02:00
cinap_lenrek 56ffc907ac kernel: stop the practice of passing DMDIR to devir() perm argument
devdir internally replicates the qid in ther perm stat field
already and the practice of explicitely passing just causing
confusion when done inconsistently.
2018-06-03 23:33:35 +02:00
cinap_lenrek 8c70c09bfd devaoe: fix dotdot walk in devlinkdir, make perms consistent 2018-06-03 23:30:57 +02:00
cinap_lenrek a2623fd82a devenv: make #ec files not show up as world writable 2018-06-03 23:30:05 +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
aiju 55edec2b8a tcs: support EUC-JP JIS X 0212 codes 2018-06-02 00:02:29 +00:00
cinap_lenrek 5db80edcd1 merge 2018-06-01 23:54:44 +02:00
cinap_lenrek 7113f730de ndb/cs: make ipv6 only host practical by checking ip version on local interfaces
avoid returning ip addresses that cannot be reached due
to lack of a compatible ip address. this means when here
is no ipv4 address configured, we wont return ipv4 addresses
and would not query dns for an A record.

likewise, when here is no ipv6 address configured then
we wont query dns for an AAAA record.

ipv6 lookups can still be disabled with the -4 flag just
as before.
2018-06-01 23:53:09 +02:00
qwx 50b36c5112 doom: don't set repl if scale is 1 2018-05-31 05:11:33 +02:00
cinap_lenrek 16c87febd3 sdram: properly support multiple ramdisks, so that ramdiskX corresponds to sdZX 2018-05-29 22:50:04 +02:00
qwx f1eb657db0 emulators ui: don't call flushmouse twice 2018-05-29 05:28:31 +02:00
spew 3d0ebdc439 6c, 8c: Fix nocast cast bug which prevents address arithmetic from being computed at compile time 2018-05-28 19:38:33 -04:00
cinap_lenrek 6b22a732e8 merge 2018-05-27 23:05:00 +02:00
cinap_lenrek 8f9642a514 9boot: detect SYSLINUX "memdisk" and pass to kernel via ramdisk0= parameter
this makes virtual "memdisk" from SYSLINUX accessible to
the kernel, allowing the iso to be loaded via TFTP and
started without any ethernet or disk drivers available.
2018-05-27 23:03:38 +02:00
cinap_lenrek 5da4f0fc0f sdram: experimental ramdisk driver
this driver makes regions of physical memory accessible as a disk.

to use it, ramdiskinit() has to be called before confinit(), so
that conf.mem[] banks can be reserved. currently, only pc and pc64
kernel use it, but otherwise the implementation is portable.

ramdisks are not zeroed when allocated, so that the contents are
preserved across warm reboots.

to not waste memory, physical segments do not allocate Page structures
or populate the segment pte's anymore. theres also a new SG_CHACHED
attribute.
2018-05-27 22:59:19 +02:00
aiju 52698c726c sshfs(4): language 2018-05-27 11:22:23 +00:00
aiju 6c44dbe4fd sshfs(4): don't drink and troff 2018-05-27 11:09:01 +00:00
aiju 41013392a1 sshfs(4): replace the much maligned -r option 2018-05-27 11:06:07 +00:00
spew 1ddf581f8c cc: fix result of operation not used warning for void casts 2018-05-24 19:31:55 -04:00
aiju 434fc6a1c4 dc(1): add pi program as example 2018-05-24 15:42:43 +01:00
aiju 1984f6813c merge 2018-05-24 13:41:08 +01:00
aiju be3809866c ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
cinap_lenrek ad7390dda8 ndb/dnsdebug: handle .ip6.arpa names 2018-05-23 19:44:12 +02:00
cinap_lenrek 03ced8cca1 ndb/dnsquery: handle .ip6.arpa names, don't mount the dns service 2018-05-23 19:43:45 +02:00
cinap_lenrek d5c906f515 ip/tftpd: deal with block wrap arround 2018-05-22 01:53:15 +02:00
cinap_lenrek 66eac7d687 pc64: fix fpu bug
fpurestore() unconditionally changed fpstate to FPinactive when
the kernel used the FPU. but in the FPinit case, the registers are
not saved by mathemu(), resulting in all zero initialized registers
being loaded once userspace uses the FPU so the process would have
wrong MXCR value.

the index overflow check was wrong with using shifted value.
2018-05-21 19:23:54 +02:00
cinap_lenrek 930efe67e8 ape: fix auth.h 2018-05-20 23:22:41 +02:00
cinap_lenrek e69cde3120 authsrv: implement AuthNTLM 2018-05-20 22:59:24 +02:00
cinap_lenrek 87617ea25e merge 2018-05-20 22:50:50 +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
qwx 2e717a5557 camv: fix leak on resize 2018-05-20 16:47:41 +02:00
aiju 1f8d347c92 fplot: draw axes; zoom more naturally; unzoom 2018-05-20 09:14:16 +00: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 e684b2a3fb authsrv: work arround linux omiting final Z(4) after the AvrPairs 2018-05-20 01:37:38 +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
spew a59aa24a94 merge 2018-05-18 21:39:19 -04:00
spew 9360415d56 ssh:add -r for extra raw mode 2018-05-18 21:36:33 -04:00
cinap_lenrek 530ab11783 merge 2018-05-16 21:43:29 +02:00
cinap_lenrek 6e284eaad5 ndb/cs: prevent deadlock with ndb/cs by mounting /srv/dns *AFTER* /net
the dnsquery() library function should not start mouting /srv/dns on
its own. this problem arrises only for ndb/cs as it is started before
ndb/dns.

the issue with mounting /srv/dns before /net is when ndb/cs attempts
to read the list of interfaces, accessing /net/ipifc, which triggers
a rpc to ndb/dns as it is ontop of the mount. this can yield a deadlock
when ndb/dns blocks its 9p loop waiting for requests to complete on
a refresh and the requests are stuck waiting for ndb/cs to translate
a dial string for announce().
2018-05-16 21:41:42 +02:00
aiju b8430d5395 sshfs: if we're going to annoy everyone we should at least match documentation 2018-05-15 16:19:28 +01:00
cinap_lenrek 5c2b4dfc81 9boot: DHCPv6 support for efi 2018-05-15 02:18:50 +02:00
qwx c83a6f9c00 emulators ui: fix input botch and typo 2018-05-14 20:49:08 +02:00
cinap_lenrek 7e33a75e36 merge 2018-05-14 19:19:50 +02:00
cinap_lenrek c9bb6f68eb devip: don't set mtu of interface to zero when not specified (thanks joe9)
change 9f74a951ae6a introduced a bug that set the mtu of a new
interface to 0 when not specified in the add ctl.
2018-05-14 19:18:13 +02:00
BurnZeZ f44cfeb7d7 audio/pcmconv: fix accidental cast to float instead of double 2018-05-13 19:58:16 +00:00
qwx 19d6a98038 ape: add signed fixed size integer typedefs to u.h 2018-05-13 07:13:00 +02:00
qwx 88537cfe9b demote libemu to common code
- too small, nothing else that won't be under /games will use it
- "libemu" as a name doesn't make sense here
2018-05-13 07:01:47 +02:00
qwx abf8c8bf2c add port of aiju's port of games/2600 2018-05-12 19:21:48 +02:00
qwx 1195ca910c add libemu
move redundant code from emulators to a common library
2018-05-12 19:20:53 +02:00
qwx 70c7a9eb07 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
cinap_lenrek 2728e06589 ndb/dns: lookup *all* entries in dblookup(), v4 and v6 queries in parallel, remove weigthed timeouts
dblookup() used to only return the first matching entry. in
case of ipv6, we want all entries returned to get both v4
and v6 addresses... and these might not neccesarily be in
the same entry (see /lib/ndb/common). note also this makes
it behave the same as in cachedb mode which reads in the
whole database.

we do not know if v4 or v6 routing works, so the simplest
is just to query v4 and v6 nameservers in parallel. this is
done by changing serveraddrs() to return one address type,
and we make sure to get at least one v4 and one v6 address
each round.

get rid of the weigthed timeout code... there where too many
assumptions. instead, we give a round 500ms timeout (or 1 second
in patient mode) and honor the maximum query time.
2018-05-11 22:37:28 +02:00
cinap_lenrek d5cf062e7a merge 2018-05-11 16:16:37 +02:00
cinap_lenrek 4c9cbe484d fix manpage cross references 2018-05-11 16:15:08 +02:00
cinap_lenrek f428a5daaa libplumb: fix plumbunpackpartial()
- *morep was not set in error cases
- attr and ntext could be leaked
2018-05-10 19:46:38 +02:00
cinap_lenrek fcb974af3a merge 2018-05-10 19:38: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 298f239695 ip: add some primitive rate limiting knobs to counteract bufferbloat 2018-05-10 19:31:58 +02:00
aiju 0e5888a0cf add usb tablet support 2018-05-08 08:28:48 +00:00
aiju ec60da4961 libmp: add awk-generated tests 2018-05-05 12:14:39 +00:00
aiju a7a07b2d43 mpdiv: get signs right... 2018-05-05 12:03:45 +00:00
aiju 0930daf295 mp: more tests 2018-05-05 08:49:38 +00:00
aiju 72ad2d1ee1 mpmagadd: oops... 2018-05-04 21:42:08 +00:00
aiju 35065b9127 mpmagadd: force output sign +1 always 2018-05-04 21:41:16 +00:00
aiju 8dc43a951c mpdiv: fix sign bug 2018-05-04 21:18:46 +00:00
aiju 454d26a0e4 pc: add $ operator 2018-05-04 11:07:39 +01:00
aiju fa028a9352 libmp: add new tests 2018-05-04 00:42:59 +00:00
aiju cda7129cd2 mplogic: don't drop carry out 2018-05-03 23:31:24 +00:00
aiju 98a5fc6535 pc(1): always allocate at least one mpdigit (itomp assumes this) 2018-05-03 14:06:15 +01:00
cinap_lenrek 2cfc72db76 merge 2018-05-03 12:28:41 +02:00
mischief 12716019bf libplumb: fix old leak introduced in 18b8ed1a5ea3 2018-05-03 01:26:09 -07:00
cinap_lenrek b2599999be ipconfig(8): clarify -p and -P options 2018-05-03 09:09:39 +02:00
aiju 02e584c06c games/mines: chain new CLists in splitknown correctly 2018-05-02 23:01:39 +00:00
aiju 28c519295f games/mines -g: elements taken from list should be -2, not -1 2018-05-02 22:47:04 +00: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 0c7a3ad1c9 remove ipv6on, update ipconfig(8) 2018-05-02 20:29:29 +02:00
cinap_lenrek 2247741fe0 ip/ipconfig: fix exit status for ndbconfig 2018-05-02 00:03:54 +02:00
cinap_lenrek 8f91d94d19 merge 2018-05-01 23:40:00 +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 8e53fe132e ndb/cs: fix crash in ndbredorder due to ndbnew() not maintaining the ->line ring
we have to maintain the ->line chain for ndbreorder() to work, so add
a little helper: ndbline() which replicates the ->entry chain and links
the last tuple to the first; makeing the whole list into a single line.
2018-05-01 22:17:27 +02:00
mischief d05b90f300 libplumb: allow attributes larger than 4096, set some malloc tags 2018-05-01 12:47:26 -07:00
cinap_lenrek bc4469e5d2 ndb/csquery: insert \n between read chunks 2018-04-28 04:40:09 +02:00
cinap_lenrek af3fd92789 ip/ppp: remove old struct 2018-04-28 04:39:09 +02:00
cinap_lenrek dbfb320566 libndb: cleanup 2018-04-28 04:38:34 +02:00
aiju e87ca8d976 mpdiv: fix dividing 0 by a small power of two 2018-04-26 14:55:02 +01:00
cinap_lenrek 69298c79ab merge 2018-04-24 21:25:16 +02:00
cinap_lenrek 5aae3d344b devip: improve arp and ndp code
there appears to be confusion about the refresh flag of arpenter().
when we get an arp reply, it makes more sense to just refresh
waiting/existing entries instead creating a new one as we do not
know if we are going to communicate with the remote host in the future.

when we see an arp request for ourselfs however, we want to always
enter the senders address into the arp cache as it is likely the sender
attempts to communicate with us and with the arp entry, we can reply
immidiately.

reject senders from multicast/broadcast mac addresses. thats just silly.

we can get rid of the multicast/broadcast ip checks in ethermedium and
do it in arpenter() instead, checking the route type for the target to
see if its a non unicast target.

enforce strict separation of interface's arp entries by passing a
rlock'd ifc explicitely to arpenter, which we compare against the route
target interface. this makes sure arp/ndp replies only affect entries for
the receiving interface.

handle neighbor solicitation retransmission in nbsendsol() only. that is,
both ethermedium and the rxmitproc just call nbsendsol() which maintains
the timers and counters and handles the rotation on the re-transmission
chain.
2018-04-24 20:21:09 +02:00
aiju 3c53021357 forp: fix ternary operator 2018-04-24 12:58:54 +01:00
aiju 29f03ba4e7 libsat, forp: fix va_list hack on amd64 2018-04-24 12:20:07 +01:00
cinap_lenrek 20b9326dad devip: fix ipv6 icmp unreachable handling, fix retransmit, fix ifc locking, remove tentative check 2018-04-22 18:54:13 +02:00
cinap_lenrek c80d94304d devip: cleanup ipmux.c 2018-04-22 18:50:45 +02:00
cinap_lenrek 8962551055 devip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium 2018-04-22 18:50:11 +02:00
cinap_lenrek dbf13129a7 devip: cleanup rudp.c 2018-04-22 18:49:01 +02:00
cinap_lenrek 9860172fce devip: cleanup tcp.c 2018-04-22 18:48:32 +02:00
cinap_lenrek c5c613357e devip: cleanup udp.c 2018-04-22 18:48:08 +02:00
cinap_lenrek 26aca332bb devip: various icmp stuff
no need to rlock ifc in targetttype() as we are called from icmpiput6(),
which the ifc rlocked.

for icmpadvise, the lport, destination *AND* source have to match.

a connection gets a packet when the packets destination matches the source
*OR* the packets source matches the destination.
2018-04-22 18:47:19 +02:00
cinap_lenrek 575398eb9b devip: verify ifcid on routehint check, check Route.ref for free'd routes
v4lookup() and v6lookup() do not acquire the routelock, so it is
possible to hit routes that are on the freelist. to detect these,
we set ref to 0 and check for this case, avoiding overriding the ifc.

re-evaluate routes when the ifcid on the route hint doesnt match.
2018-04-22 18:42:22 +02:00
cinap_lenrek 638b4a1ec1 devip: add "reflect" ctl message, fix memory leaks in icmpv6, fix source address for icmpttlexceeded, cleanup 2018-04-19 01:08:51 +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 fc3c91d91f ndb/dnsquery, ndb/csquery: handle long lines 2018-04-19 01:00:12 +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 48d117ed64 ndb/dns: remove single-ip-address assuptions 2018-04-17 00:48:42 +02:00
cinap_lenrek ac962a0ae4 ndb/cs: remove single-ip-address assumptions 2018-04-17 00:45:37 +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 c4603260f8 ndb/cs: remove paranoia debug toggle 2018-04-14 20:32:26 +02:00
cinap_lenrek 1da5285c1e libc: allow /net/cs to specify local address for dial() 2018-04-14 20:28:58 +02:00
kremlin 8666ec6b55 add missing ethermii.h dependencies. patch from cinap_lenrek 2018-04-12 17:50:10 -04:00
cinap_lenrek 4354c401c1 cpurc: remove obsolete device binds, run diskparts after $sysname is known. remove /env/boottime. document. 2018-04-12 21:30:28 +02:00
cinap_lenrek 780c5dfd1a ip/ipconfig: setup per local address default routes 2018-04-11 22:57:16 +02:00
cinap_lenrek 874701d193 devip: make v4 ifc broadcast and multicast routes specific to address
this allows one to access the same network via multiple interfaces,
the local address then determines which interface is used.
2018-04-11 22:56:25 +02:00
cinap_lenrek eac7a2b12a ip/gping: icmpv6 support 2018-04-10 20:04:20 +02:00
cinap_lenrek 829a451c2b devip: properly initialize the connection ignoreadvice and tos flags 2018-04-10 20:02:03 +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 4cda213a78 ip(3): troff magic 2018-04-08 22:22:03 +02:00
cinap_lenrek f692b73955 ip(3): document changes on /net/arp and /net/iproute 2018-04-08 22:11:18 +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 c2dd9b1da7 devip: implement source specific routing 2018-04-08 21:15:00 +02:00
cinap_lenrek dc8432d459 nusb/usbd: increase buffer size to capture port information
due to the addition of uframes property, the buffer got truncated
resulting in usbd not recognizing the number of roothub ports.
2018-04-08 20:51:48 +02:00
henesy 21c7c68307 remove duplicate -m definition in upasfs(4) (thanks rodri) 2018-04-06 18:05:25 -05:00
mischief 034d0b08e9 ape: improve assert macro
in a statement such as:

if(expr)
	assert(a);
else
	assert(b);

the previous definition of assert would fail to compile, as the else
would be dangling.  with a ternary expression, this construct works
fine.
2018-04-02 21:44:21 -07:00
aiju 9632ff2381 forp(1): document [] and some bugs 2018-03-31 12:41:41 +00:00
aiju 20e695c178 forp: fix precedence for [] 2018-03-31 12:30:48 +00:00
qwx 7d18756b39 gb*: reverse savegame field polarity 2018-03-31 11:38:09 +02:00
qwx 84351ae4cb blit,c64,gb*: fix phaser coolant leak during resize 2018-03-31 11:37:25 +02:00
aiju 2fdd83c827 add forp(1) manpage 2018-03-28 20:49:39 +00:00
aiju 57edb0b2d4 sat.h: update to include satget 2018-03-28 20:36:04 +00:00
aiju 2ca54f6a26 forp: fix multiplication; change division to C semantics 2018-03-28 20:14:29 +00:00
aiju 382d37dbf0 add forp 2018-03-28 17:08:30 +00:00
aiju 80474f7f59 libsat: fix one of the satmore() bugs 2018-03-26 21:39:23 +00:00
Alex Musolino 586a24770c lock(2): fix typo 2018-03-23 11:34:39 +10:30
aiju 39dd26bf08 sat: satget: don't duplicate binary clauses 2018-03-22 13:35:52 +00:00
aiju 8389465f94 sat: satget: include unit literals 2018-03-22 13:15:44 +00:00
aiju 2e2ae33a47 sat: add satget 2018-03-22 12:46:04 +00:00
aiju 3cb5494b26 sshfs: usage 2018-03-20 20:51:04 +00:00
aiju ef17e2a693 resample(1): document -n option 2018-03-20 20:31:25 +00:00
23hiro 992ed21419 man pages: SYNOPSYS typo 2018-03-20 18:24:26 +01:00
aiju 5d4a456ae6 libsat: setmalloctag, fix incorrect allocation size 2018-03-20 11:23:41 +00:00
cinap_lenrek 547f60b4c5 devip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup
rfc4861 7.2.2:

If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation.

this change adds ndbsendsol() which handles the source address selection
and also handles the arp table locking; avoiding access to the arp entry
after the arp table is unlocked.

cleanups:

- use ipmove() instead of memmove().
- useless extern qualifiers
2018-03-19 01:11:08 +01:00
cinap_lenrek 20cbb88e32 merge 2018-03-18 07:53:10 +01:00
cinap_lenrek 71f807873b devip: more v6 improvements
ipv4local() and ipv6local() now take remote address argument,
returning the closest local address to the source. this
implements the standartized source address selection rules
instead of just returning the first local v4 or v6 address.

the source address selection was broken for esp, rudp an udp,
blindly assuming ifc->lifc->local being a valid v4 address.
use ipv6local() instead.

the v6 routing code used to lookup source address route to
decide to drop the packet instead of checking the interface
on the destination route.

factor out the route hint from Conv and put it in Routehint
structure. avoiding stack bloat in v4 routing. implement the
same trick for v6 avoiding second route lookup in ipoput6.

fix memory leak in icmpv6 router solicitation handling.

remove old unfinished handling of multiple v6 routers. should
implement source specific routes instead.

avoid duplication, use common convipvers() function.

use isv4() instead of memcmp v4prefix.
2018-03-18 07:50:48 +01:00
cinap_lenrek 8ce98a0b32 ip/ipconfig: stop spamming the console about router receiving RA's 2018-03-18 07:31:09 +01:00
aiju 87df80019e add sat(1) command 2018-03-18 03:03:12 +00:00
aiju d68417bc01 satmore: don't try to override user defined variables 2018-03-18 03:01:21 +00:00
aiju 9f18b0f388 add #pragma incomplete to sat.h 2018-03-18 01:15:07 +00:00
mischief c3c7429dc2 nusb/ptp: set storage name to their human readable description string 2018-03-17 15:06:13 -07:00
cinap_lenrek c96fb5471a devusb: fix format print warnings for ep->ntds and ep->uframes 2018-03-17 21:55:39 +01:00
cinap_lenrek 4d59f9bd1a camv: fix display locking issues 2018-03-17 21:27:07 +01:00
aiju c2c9562e3c add libsat 2018-03-17 19:26:26 +00:00
aiju e0be49d7f1 mines(1): fix misleading HISTORY wording 2018-03-17 19:07:50 +00:00
cinap_lenrek 2c1415277f pc64: fix _intrr(), avoid the linker moving _intrr() arround 2018-03-17 18:25:12 +01:00
cinap_lenrek 108063bc3a pc64: add magic _intrr() symbol for ktrace (thanks mischief) 2018-03-17 17:19:42 +01:00
qwx 199f090b6a devfs: revert commit 4000
induces a kernel panic under normal circumstances
2018-03-17 11:25:27 +02:00
qwx 372d359e28 kernel: let /rc/bin/diskparts attach #k after #S partitions are loaded up 2018-03-17 01:04:31 +02:00
qwx 14cd988a48 devfs: only set configed flag if config was read successfully
this is just to retry reading the configuration at least once after an error
2018-03-17 01:00:51 +02:00
cinap_lenrek f8961199dd nvidia: add pci device id for GeForce 6200 AGB (thanks bitmapper) 2018-03-14 22:41:30 +01:00
aiju 7ca11774a1 games/mines: build a better ghost trap 2018-03-10 14:40:34 +00:00
aiju b7d31909f6 mptod/dtomp: add to mp.h 2018-03-09 21:30:06 +00:00
aiju b9a08958e2 mp: add mptod and dtomp 2018-03-09 20:51:28 +00:00
aiju bf555abcc3 add camv 2018-03-07 20:45:19 +00:00
aiju 657f0ed99a nusb/cam: ctl message fixes 2018-03-07 20:44:55 +00:00
aiju 2da5e135dc add nusb/cam 2018-03-07 10:06:18 +00:00
aiju a2d8dcfd82 usb lib: add maxpkt and ntds to Altc struct 2018-03-07 10:04:27 +00:00
aiju 56405e0919 usbehci: catch interrupt in tsleep 2018-03-07 08:45:06 +00:00
aiju 9226caf2a3 usbehci: add uframes control request to return uframes one at a time 2018-03-06 17:18:48 +00:00
cinap_lenrek 097879eace merge 2018-03-05 06:10:56 +01:00
cinap_lenrek 6f70699aec usbehci: fix medium- to low quality highspeed isochronous transfers
everything was broken. strting with hsinit not even chaining
the itd's into a ring. followed by broken buffer pointer pages.
finally, the interrupt handler's read transaction length
calculation was completely bugged, using the *FRAME* index
to access descriptors csw[] fields and not reseting tdi->ndata
thru the loop.

minor stuff:

iso->data needs to be freed with ctlr->dmafree()

put ival in iso->ival so ctl message cannot override the endpoints
pollival and screw up deallocation.
2018-03-05 06:09:31 +01:00
aiju 633397bfda sshfs: update qid and filename on Tcreate 2018-03-04 19:52:35 +00:00
cinap_lenrek 8e654cf761 merge 2018-03-04 06:12:37 +01:00
cinap_lenrek 53e1708bcb igfx: add support for T510 (thanks mycroftiv) 2018-03-04 06:10:45 +01:00
khm 891a8c4f2c manpages: shut up about tex (1) 2018-02-28 12:55:48 -08:00
glenda 59b31cccdb g: revert accidental change, document missing file type 2018-02-27 10:08:23 -05:00
glenda 60befe7df1 games/mix: fix incorrect line numbers 2018-02-26 22:39:49 -05:00
cinap_lenrek d1c0f53fcd ns: remove left over vararg check pragma 2018-02-26 19:58:54 +01:00
cinap_lenrek 8a01033efc vmx: allow setting mac address of using ea:nnnnnnnnnnnn! prefix, use genrandom() to generate mac globally unique mac address 2018-02-25 21:11:41 +01:00
cinap_lenrek 6728a5ec23 devloopback: reassign device letter from #X to #λ to avoid collision with devvmx 2018-02-25 19:06:37 +01:00
cinap_lenrek b2d7992025 kernel: properly handle bad attach specifiers
- only accept decimal for numeric device id's
- exclude negative device id's
- device id's out of range yield Enodev
2018-02-25 17:11:18 +01:00
aiju d3f4786a1f mines: documentation and chronometric control of supernatural apparitions 2018-02-25 03:38:25 +00:00
aiju 4aff59b64c ghost in the minesweeper shell 2018-02-25 02:50:24 +00:00
cinap_lenrek f0a314605f devether: remove (unimplemented) detach, allow device creation on attach
we allow devether to create ethernet cards on attach. this is useull
for virtual cards like the sink driver, so we can create a sink
by simply: bind -a '#l2:sink ea=112233445566' /net

the detach routine was never called, so remove it from the few drivers
that attempted to implement it.
2018-02-25 03:42:38 +01:00
cinap_lenrek 5560efb3db devip: fix crash on negative dev id on attach 2018-02-25 03:32:29 +01:00
cinap_lenrek 05cd5cb200 ns, devproc: quote path and spec arguments for /proc/$pid/ns, namespace(6) does support quoting 2018-02-25 03:24:31 +01:00
aiju be8a8129a2 games/mines: bikeshedding 2018-02-25 01:43:21 +00:00
stanley lieber 4e7b5b7e92 fortunes, rob, rsc, theo: What's this? https://plan9.io/ 2018-02-20 19:34:03 -05:00
cinap_lenrek 986278e04d nusb/ether: mux bridges, bring in line with devether 2018-02-18 19:56:58 +01:00
cinap_lenrek 729c9c39d9 devether: mux bridges, portable netconsole 2018-02-18 19:56:01 +01:00
cinap_lenrek a2e8246ffc nusb: add missing header dependencies to mkfiles 2018-02-18 02:06:55 +01:00
cinap_lenrek 120ab04dd2 kernel: fix missing header dependency for ethersink.$O 2018-02-18 02:05:22 +01:00
cinap_lenrek 5d6a11c387 audiohda: add device id for x260's Intel Sunrise Point-LP. (thanks rodri) 2018-02-16 21:04:38 +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 df6a30f3c0 if ether, then etherif.h 2018-02-12 19:05:01 +01:00
cinap_lenrek 0458323554 merge 2018-02-12 01:50:24 +01:00
cinap_lenrek 57c53564b3 ethersink: after the experiment, the zeros get dismantled. and then destroyed. 2018-02-12 01:48:20 +01:00
BurnZeZ 2346954e04 twsi(3): fix wrong unicode codepoint in manpage 2018-02-11 21:54:10 +00:00
cinap_lenrek 3d0f4da104 ethersink: provide promisc and multicast functions for v6, set out queue limit to 0 on attach, add to pc64 config 2018-02-11 19:51:23 +01:00
cinap_lenrek d6e0e9c402 kernel: move devether and wifi to port/
the only architecture dependence of devether was enabling interrupts,
which is now done at the end of the driver's reset() function now.

the wifi stack and dummy ethersink also go to port/.

do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not
every caller of intrenable() has to be aware of it.
2018-02-11 18:08:03 +01:00
aiju debb786fea aijuboard bootloader: fix 10BASE-T / 100BASE-TX support 2018-02-10 13:15:57 +00:00
aiju f113e2d6d5 zynq: fix 10BASE-T and 100BASE-TX support 2018-02-10 01:04:05 +00:00
aiju af0de5ada8 fix sort(1) bug where it incorrectly included the field separator in the comparison if it was >= Runeself 2018-02-07 18:53:08 +00:00
cinap_lenrek 650e5db5a2 usbxhci: fix mistake in completering()
the td index "x" was incremented twice, once in for loop
and in the body expression. so r->rp only got updated
every second completion. this is wrong, but harmless.
2018-02-07 18:13:22 +01:00
cinap_lenrek c5c159b17a upas/fs: fix imap atom quoting (thanks Piotr Kubaj) 2018-02-05 19:16:29 +01:00
aiju 721b141438 add ptrap 2018-02-05 09:38:59 +00:00
cinap_lenrek d06196ab87 auth/asn12rsa: also convert ASN.1 encoded public key to plan9 format 2018-02-05 03:21:51 +01:00
cinap_lenrek 58914b4b0b /sys/lib/dist/mkfile: fix cfg/plan9.ini dependency (only visible after binds) 2018-01-31 19:44:54 +01:00
cinap_lenrek 650a4434a6 webfs(4): document -d and -D flags 2018-01-31 19:09:11 +01:00
cinap_lenrek 83d8a24215 pc64: fix kmap() and invlpg()
flushing tlb once the index wraps arround is not enougth
as in use pte's can be speculatively loaded. so instead
use invlpg() and explicitely invalidate the tlb of the
page mapped.

this fixes wired mount cache corruption for reads approaching
2MB which is the size of the KMAP window.

invlpg() was broken, using wrong operand type.
2018-01-29 08:26:42 +01:00
cinap_lenrek b5362dc722 ndb/dns: cleanup 2018-01-28 22:46:48 +01:00
cinap_lenrek 549a6745e3 ndb/dns: fix leak in myaddr(), normalize ip strings
remove myaddr() function and replace with myip() function
that receives binary ip address. and don't use string
comparsion for ip addresses... parse and then ipcmp().

for sanity reasons, normalize ip address strings and
reject unparsable ones. done by calling ipalookup()
with a binary ip address.
2018-01-28 22:36:01 +01:00
cinap_lenrek b3b938d5ec ndb/cs: handle v4 only case for rudp 2018-01-28 17:58:16 +01:00
cinap_lenrek 1d10ecdaae venti/conf: fix padding so we write multiple of sector size 2018-01-28 17:22:00 +01:00
cinap_lenrek d2ec488a93 ip/dhcpd: remove old testing code 2018-01-27 23:47:46 +01:00
cinap_lenrek 34f19570b9 libndb: retire deprecated csgetval(), ndbgetval() and ndblookval() functions 2018-01-27 23:46:48 +01:00
cinap_lenrek 6a23ef917b kernel: initialize cyclefreq for machno > 0 in guesscpuhz() 2018-01-27 19:58:48 +01:00
cinap_lenrek 26193c4bff upas/fs: try to deal with nil mail body (can happen when fetch fails) 2018-01-27 19:02:31 +01:00
cinap_lenrek a863cf8e7e upas/fs: deal with imap returning more uid's than allocated from previus "messages" command 2018-01-25 02:14:51 +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 950e22be67 ip: make pkt interfaces unbind on close (from inferno) 2018-01-22 21:33:22 +01:00
cinap_lenrek b670fc0ac5 ppp: remove left over debug print 2018-01-21 23:56:37 +01:00
cinap_lenrek 218e61f80f ppp(8): remove BUGS section, client auth has been fixed. 2018-01-21 22:58:30 +01:00
cinap_lenrek 98b1f2a75b ppp: mschapv2 support 2018-01-21 22:55:14 +01:00
cinap_lenrek 3004f058f6 libauth: add auth_respondAI() function to get AuthInfo for mschap/mschapv2 2018-01-21 22:37:45 +01:00
cinap_lenrek a7974d96b7 factotum: implement mschapv2 role=server authentication (for ppp)
this implements the server part of mschapv2 with the new
authserver changes.

we also provide AuthInfo for the client now with the
MPPE secret and the authenticator.
2018-01-21 22:35:01 +01:00
cinap_lenrek fd1e50d653 authsrv: implement mschapv2 authentication, include MPPE secret in the ticket
this adds new rpc for mschapv2 authentication (21)

deliver the MPPE secret not after the ticket/authenticator
response as cheartext, but include it in the first 128 bit
of the ticket key. and the authenticator in the first 160 bit
of the authenticator random field.
2018-01-21 22:32:34 +01:00
cinap_lenrek 9840c50a3e gre: don't drop pptp packets when smaller than v4 header 2018-01-20 15:13:11 +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 ccf72da47d set router R-flag when sendra is active for neighbor advertisement
windows 7 just drops the default router when it tries to
probe for router reachability but gets a neighbor avertisement
from the router with the router bit clear.

so set the R-flag when sendra is active, which implies that
we are a router.
2018-01-16 20:42:01 +01:00
cinap_lenrek 2bd59d9cb3 authsrv: fix chap
use OCHAPREPLYLEN instead of sizeof(reply) (no padding).

exit after sending ticket response to force eof as factotum
unconditionally reads tailing secret hash (as of mschap).
2018-01-15 01:31:27 +01:00
23hiro 87c2d23c8f ipconfig(8): remove dhcp mention from -6 example 2018-01-14 23:58:25 +01:00
cinap_lenrek b85245f5d2 ip/ipconfig: add v6 deault route from router advertisements 2018-01-14 19:33:30 +01:00
cinap_lenrek 84e67ffa88 listen(8): add -a option to restrict announce address, document tcp17019 and tcp17020 2018-01-14 19:32:13 +01:00
cinap_lenrek 7b5cf8de2d ether79c970: dont disable promisc mode when multicast table is not empty 2018-01-13 11:41:37 +01:00
cinap_lenrek ad36593a99 ether82557: don't turn off promisc mode when mcast table is not empty
the driver doesnt implement multicast filter, but just turns
on promiscuous mode when a multicast address is added. but this
breaks when one actually enables and then disables promiscuous
mode with say, running snoopy.

we have to keep promisc mode active as long as multicast table
is not empty.
2018-01-13 07:16:17 +01:00
cinap_lenrek ba87e58876 wifi: learn target ip address from neighbor advertisements in dmat proxy 2018-01-12 18:28:50 +01:00
cinap_lenrek 2088f8c991 wifi: filter out loopback traffic from myself
broadcast traffic was received back on the wire causing
duplicate address detection to break with dmat proy as
the rewritten broadcasts where observable.

the fix is to just ignore packets from ourselfs received
from the air. devether already handles loopback.
2018-01-12 08:01:15 +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 acb206859d ether8169: deal with kernel memory exhaution
when kernel memory is exhausted, rtl8169replenish() can fail
to plant more receive descriptors and rtl8169receive() would
run over the receive tail and crash on the nil ctlr->rb[x].

rtl8169receive() is called on "Receive Descriptor Unavailable"
and "Packet Underrun" so we will try to replenish descriptors
in the beginning first in case memory was exhausted and memory
is available again and make sure not to run over the tail.
2018-01-08 00:23:26 +01:00
cinap_lenrek 069230cd62 forgot to commit asn1dump.c... 2018-01-07 05:17:34 +01:00
cinap_lenrek 05f721e998 venti: fix wrong channel element size for amd64 (thanks mycroftiv) 2018-01-06 20:21:50 +01:00
cinap_lenrek 7776180407 tlssrv: remove usage reference to lost auth/secretpem 2018-01-06 08:44:12 +01:00
cinap_lenrek 1c3377a67f factotum: remove unused sshrsa.c 2018-01-06 08:37:32 +01:00
cinap_lenrek 8ff72ce20d libsec: remove asn1toDSApriv() 2018-01-06 08:34:25 +01:00
cinap_lenrek a200ecd3a6 remove asn12dsa, dsa2pub, dsa2ssh and dsagen
was mostly usefull for old ssh.
2018-01-06 08:32:51 +01:00
cinap_lenrek 91a701747c auth/asn1dump: include in mkfile 2018-01-06 07:44:12 +01:00
cinap_lenrek d4a830e2e1 tlsclient: allow dumping the server's certificate with new -d flag
usefull for debugging, like:

./8.tlsclient -d /fd/3 tcp!code.9front.org!https |[0=3] auth/asn1dump
2018-01-06 07:43:08 +01:00
cinap_lenrek e548a86575 tlsclient: remove X509dump() call, writes to fd 1 2018-01-06 06:25:45 +01:00
cinap_lenrek 7e4b669393 /sys/lib/dist: split 9boot into 9bootproto, make *.386.iso and *.amd64.iso targets 2018-01-05 08:41:46 +01:00
cinap_lenrek b437065950 stats: show amount of reclaimable pages (add -r flag)
reclaimable pages are user pages that are used for
caches like the image cache, mount cache and swap cache.
2018-01-05 00:52:14 +01:00
cinap_lenrek d3e54ff2d9 pc kernel: fix wrong simd exception mask (fixes go bootstrap) 2018-01-04 04:38:31 +01:00
cinap_lenrek 743f65c878 ape/libauth: remove auth_wep.$O from mkfile 2018-01-02 06:05:47 +01:00
cinap_lenrek e8b46f6972 ape: update auth.h header for APE 2018-01-02 04:59:44 +01:00
cinap_lenrek f70ebd8e62 factotum(4): document dp9ik, update protocol list 2018-01-02 04:50:13 +01:00
cinap_lenrek 77ad456b31 libauth: simplify _attrfmt() using fmtprint() avoiding stack buffer 2018-01-02 04:47:42 +01:00