summaryrefslogtreecommitdiff
path: root/sys/src/9/port/netif.c
AgeCommit message (Collapse)Author
2018-06-03kernel: stop the practice of passing DMDIR to devir() perm argumentcinap_lenrek
devdir internally replicates the qid in ther perm stat field already and the practice of explicitely passing just causing confusion when done inconsistently.
2018-02-25devether: remove (unimplemented) detach, allow device creation on attachcinap_lenrek
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.
2015-08-03kernel: dont rely on atoi() parsing hex for netif/devbridgecinap_lenrek
2014-01-11netif: fix wrong qid in 3rd level stats/ifstats files (thanks burnzez)cinap_lenrek
the stats and ifstats files in the 3rd level of a netif are not per connection, but for the interface. this made fstat fail for /net/ether0/N/*stats where N > 0 as the NETID() bits in the qid didnt compare.
2013-02-21netif: fix stat() on "stats" and "ifstats" files in network interfacecinap_lenrek
the kernel would go into endless loop when stating "stats" and "ifstats" files and the network interface having no connections, or otherwise return wrong stat info.
2012-10-11kernel: try to catch some (rare) mistakescinap_lenrek
kstrcpy() did not null terminate for < 4 byte buffers. fixed, but i dont think there is any case where this can happen in practice. always set malloctag in kstrdup(), cleanup. always use ERRMAX bounded kstrcpy() to set up->errstr, q->err and note[]->msg. paranoia. instead of silently truncating interface name in netifinit(), panic the kernel if interface name is too long as this case is clearly a mistake. panic kernel when filename is too long for addbootfile() in devroot. this might happen if your kernel configuration is messed up.
2012-10-01devproc buffer overflow, strncpycinap_lenrek
in devproc status read handler the p->status, p->text and p->user could overflow the local statbuf buffer as they where copied into it with code like: memmove(statbuf+someoff, p->text, strlen(p->text)). now using readstr() which will truncate if the string is too long. make strncpy() usage consistent, make sure results are always null terminated.
2011-12-12kernel: fix more malloc/smalloc errorscinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen