summaryrefslogtreecommitdiff
path: root/pfinet
AgeCommit message (Collapse)Author
2013-11-09Normalize whitespace at the end of each file to '\n'Justus Winter
Some files were not normalized. In console/motd.UTF8 the additional newline is intentional. Empty files were excluded as well.
2013-11-06pfinet: fix emission on the loopback deviceRichard Braun
Unlike other devices, sending packets on the loopback device causes the netif_rx() function to be called from the net_bh worker thread. Since the thread is already running, it can't wake itself up when calling mark_bh(). Use a new variable to indicate when net_bh work is pending. * glue-include/linux/interrupt.h (net_bh_raised): Declare new global variable. (mark_bh): Set net_bh_raised to 1 before waking up net_bh worker thread. * loopback.c (loopback_xmit): Add comment giving details about locking. * sched.c (net_bh_raised): Define new global variable. (net_bh_worker): Wait for net_bh_raised to become true and reset it before processing net_bh work.
2013-08-28Define and use symbolic names for important processesJustus Winter
* include/pids.h: New file. * init/init.c (frob_kernel_process): Use symbolic name for kernel process. * exec/exec.c (S_exec_init): Use symbolic name for startup process. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Likewise. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * proc/mgt.c (create_startup_proc): Likewise. * proc/main.c (main): Use symbolic name for proc process.
2013-08-23Fix polling pfinet tun for writeSamuel Thibault
* pfinet/tunnel.c (io_select_common): Also handle `SELECT_WRITE' case.
2013-07-20pfinet: Fix call to kfree_sSamuel Thibault
kfree_s expects a pointer and a size argument. Currently the sizeof(cache) is used as size argument, this is certainly not what was intented. For reference, this code was present in Linux up to version 2.3.14 and was replaced in 2.3.15. Found using coccinelle and https://raw.github.com/coccinelle/coccinellery/master/sz/sz.cocci. * pfinet/linux-src/net/ipv4/ipmr.c (ipmr_cache_delete): Fix kfree_s call.
2013-04-06pfinet: fix timeout evaluationRichard Braun
* pfinet/timer-emul.c (timer_function): Fix comparison between expire time and jiffies.
2013-03-26Fix tunnel and dummy interfacesSamuel Thibault
* pfinet/linux-src/include/linux/netdevice.h (netdevice): Add `change_flags' field. * pfinet/ethernet.c (ethernet_change_flags): Make function static. (setup_ethernet_device): Set `change_flags' field of `dev' to ethernet_change_flags. * pfinet/linux-src/net/core/dev.c (dev_change_flags): Call `change_flags' field of `dev' if non-nul, instead of calling ethernet_change_flags. * pfinet/pfinet.h (ethernet_change_flags): Remove function prototype.
2013-03-11Fix libpthread conversionSamuel Thibault
* pfinet/io-ops.c (io_select_common): Call pthread_mutex_unlock instead of __mutex_unlock.
2013-02-28Add io_select_timeout to the io interfaceRichard Braun
This change fixes a problem that can occur with non-blocking (and also blocking for very short times) select/poll calls. The problem occurs because the timeout is implemented at the client side. For a non-blocking call, this means that (depending on the code path taken in the C library) the client could get a timeout without a full RPC round-trip to the server. Moving the implementation of the timeout to the servers guarantees a full round-trip, and correct results for non-blocking calls. The modifications in this change depend on the availability of the recently added pthread_hurd_cond_timedwait_np function in libpthread. * boot/boot.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * console-client/kbd-repeat.c (repeater_select): Add a timeout parameter. * console-client/pc-mouse.c (repeater_select): Likewise. * console-client/trans.c (io_select_common): New static function. (netfs_S_io_select): Use io_select_common. (netfs_S_io_select_timeout): New function which makes use of io_select_common. * console-client/trans.h (struct consnode): Add a timeout parameter. * hurd/io.defs (io_select_timeout): New MIG routine. * hurd/io_reply.defs (io_select_timeout_reply): New MIG simpleroutine. * hurd/io_request.defs (io_select_timeout_request): Likewise. * libdiskfs/io-select.c (diskfs_S_io_select_timeout): New function. * libnetfs/io-select.c (netfs_S_io_select_timeout): Likewise. * libpipe/pipe.c (pipe_pair_select): Add a timeout parameter. * libpipe/pipe.h (pipe_select_readable): Likewise. (pipe_select_writable): Likewise. (pipe_pair_select): Likewise. * libpipe/pq.h: Include <hurd/hurd_types.h>. * libtrivfs/io-select.c (trivfs_S_io_select_timeout): New function. * pfinet/glue-include/linux/sched.h: Include <errno.h>. (interruptible_sleep_on): Function removed, replaced with ... (interruptible_sleep_on_timeout): New function. (schedule): Update to use interruptible_sleep_on_timeout. (schedule_timeout): Likewise. * pfinet/io-ops.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * pfinet/tunnel.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * pflocal/connq.c (connq_listen): Replace noblock with a timeout parameter. * pflocal/connq.h: Include <hurd/hurd_types.h>. (connq_listen): Update declaration to replace noblock with a timeout parameter. * pflocal/io.c (io_select_common): New static function. (S_io_select): Use io_select_common. (S_io_select_timeout): New function which makes use of io_select_common. * pflocal/socket.c (S_socket_accept): Update call to connq_listen to match new declaration. * storeio/io.c (trivfs_S_io_select_timeout): New function. * term/ptyio.c (pty_io_select): Add a timeout parameter. * term/term.h (pty_io_select): Likewise. * term/users.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/fifo.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/firmlink.c (trivfs_S_io_select_timeout): New function. * trans/new-fifo.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common. * trans/null.c (trivfs_S_io_select_timeout): New function. * trans/streamio.c (io_select_common): New static function. (trivfs_S_io_select): Use io_select_common. (trivfs_S_io_select_timeout): New function which makes use of io_select_common.
2013-02-24Always set flags on ethernet interfaceSamuel Thibault
* pfinet/linux-src/net/core/dev.c (dev_change_flags): Call ethernet_change_flags. * pfinet/iioctl-ops.c (S_iioctl_siocsifflags): Do not call ethernet_change_flags after calling dev_change_flags.
2013-02-24Fix IPv6 by receiving all multicastSamuel Thibault
* pfinet/ethernet.c (setup_ethernet_device): Add IFF_ALLMULTI to dev->flags.
2013-02-24Enable IPv6 packets between netdde and pfinetSamuel Thibault
* pfinet/ethernet.c (bpf_ether_filter): Make rules more readable. Add rule to enable IPv6 frames.
2013-02-05Permit to use a tunnel not in /devSamuel Thibault
* pfinet/main.c (find_device): Use basename of NAME for the comparison against "tun" and "dummy". * pfinet/tunnel.c (setup_tunnel_device): Only prepend "/dev/" to tun name if the parameter is not a path.
2013-01-14Pass pfinet errors to io_select callersSamuel Thibault
This will be needed to properly support poll in glibc. * pfinet/glue-include/linux/poll.h (POLLERR): Define to 0x1000. * pfinet/io-ops.c (S_io_select): Look for POLLERR condition. On such condition, return EIO.
2013-01-14Use SOL_* values from libcSamuel Thibault
* pfinet/glue-include/linux/socket.h (SOL_IP, SOL_IPV6, SOL_ICMPV6): Define only if not defined by libc already.
2013-01-13[IPV6]: Add IPV6_V6ONLY socket option support.Samuel Thibault
Cherry-picked from Linux 524354b4d086a4f013343d727eaccb7b4c39eb25 * pfinet/glue-include/linux/ipv6.h: Include linux/config.h> (__ipv6_only_sock, ipv6_only_sock): New macros * pfinet/linux-src/include/linux/ipv6.h: Likewise. * pfinet/linux-src/include/linux/in6.h (IPV6_V6ONLY): New macro. * pfinet/linux-src/include/linux/sysctl.h (NET_IPV6_BINDV6ONLY): New macro. * pfinet/linux-src/include/net/ipv6.h (sysctl_ipv6_bindv6only): Declare variable. * pfinet/linux-src/include/net/sock.h (ipv6_pinfo): Add ipv6only field. * pfinet/linux-src/net/ipv4/tcp_ipv4.c: Include linux/ipv6.h. (tcp_v4_get_port, tcp_v4_lookup_listener): Test for ipv6_only_sock. * pfinet/linux-src/net/ipv4/udp.c: Include linux/ipv6.h. (udp_v4_get_port, udp_v4_lookup_longway, udp_v4_mcast_next): Test for ipv6_only_sock. * pfinet/linux-src/net/ipv6/af_inet6.c (sysctl_ipv6_bindv6only): New variable. (inet6_create): Initialize ipv6only field to sysctl_ipv6_bindv6only. * pfinet/linux-src/net/ipv6/ipv6_sockglue.c (ipv6_setsockopt): Test for ipv6_only_sock. (ipv6_setsockopt, ipv6_getsockopt): Support IPV6_V6ONLY case. * pfinet/linux-src/net/ipv6/tcp_ipv6.c (ipv6_rcv_saddr_equal): New inline function. (tcp_v6_get_port): Replace old tests with ipv6_rcv_saddr_equal. (tcp_v6_connect): Test for __ipv6_only_sock. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udv6_rcv_saddr_equal): New inline function. (udp_v6_get_port): Replace old tests with udv6_rcv_saddr_equal. (udpv6_connect, udpv6_sendmsg): Test for __ipv6_only_sock.
2012-12-06pfinet: increase local port rangeRichard Braun
* pfinet/linux-src/net/ipv4/tcp_ipv4.c (sysctl_local_port_range): Set port range to 32768-61000.
2012-11-27Switch from cthreads to pthreadsRichard Braun
Makefiles, headers, types, macros and function calls are renamed where appropriate. Most of this work was done by Barry deFreese and Thomas DiModica. * auth/Makefile: Switch from cthreads to pthreads. * auth/auth.c: Likewise. * boot/Makefile: Likewise. * boot/boot.c: Likewise. * boot/ux.c: Likewise. * console-client/Makefile: Likewise. * console-client/console.c: Likewise. * console-client/driver.c: Likewise. * console-client/driver.h: Likewise. * console-client/generic-speaker.c: Likewise. * console-client/kbd-repeat.c: Likewise. * console-client/ncursesw.c: Likewise. * console-client/pc-kbd.c: Likewise. * console-client/pc-mouse.c: Likewise. * console-client/timer.c: Likewise. * console-client/trans.c: Likewise. * console-client/vga.c: Likewise. * console/Makefile: Likewise. * console/console.c: Likewise. * console/display.c: Likewise. * console/input.c: Likewise. * console/pager.c: Likewise. * defpager/backing.c: Likewise. * exec/Makefile: Likewise. * exec/exec.c: Likewise. * exec/hashexec.c: Likewise. * exec/priv.h: Likewise. * ext2fs/Makefile: Likewise. * ext2fs/balloc.c: Likewise. * ext2fs/dir.c: Likewise. * ext2fs/ext2fs.c: Likewise. * ext2fs/ext2fs.h: Likewise. * ext2fs/ialloc.c: Likewise. * ext2fs/inode.c: Likewise. * ext2fs/msg.c: Likewise. * ext2fs/pager.c: Likewise. * ext2fs/pokel.c: Likewise. * ext2fs/storeinfo.c: Likewise. * ext2fs/truncate.c: Likewise. * fatfs/Makefile: Likewise. * fatfs/dir.c: Likewise. * fatfs/fat.c: Likewise. * fatfs/fatfs.h: Likewise. * fatfs/inode.c: Likewise. * fatfs/main.c: Likewise. * fatfs/pager.c: Likewise. * fatfs/virt-inode.c: Likewise. * ftpfs/Makefile: Likewise. * ftpfs/ccache.c: Likewise. * ftpfs/ccache.h: Likewise. * ftpfs/conn.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/fs.c: Likewise. * ftpfs/ftpfs.c: Likewise. * ftpfs/ftpfs.h: Likewise. * ftpfs/ncache.c: Likewise. * ftpfs/netfs.c: Likewise. * ftpfs/node.c: Likewise. * hostmux/Makefile: Likewise. * hostmux/hostmux.h: Likewise. * hostmux/mux.c: Likewise. * hostmux/node.c: Likewise. * hostmux/stubs.c: Likewise. * hurd/shared.h: Likewise. * isofs/Makefile: Likewise. * isofs/inode.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/pager.c: Likewise. * libcons/Makefile: Likewise. * libcons/cons-switch.c: Likewise. * libcons/cons.h: Likewise. * libcons/dir-changed.c: Likewise. * libcons/file-changed.c: Likewise. * libcons/init-init.c: Likewise. * libcons/vcons-close.c: Likewise. * libcons/vcons-input.c: Likewise. * libcons/vcons-move-mouse.c: Likewise. * libcons/vcons-open.c: Likewise. * libcons/vcons-scrollback.c: Likewise. * libdiskfs/Makefile: Likewise. * libdiskfs/boot-start.c: Likewise. * libdiskfs/dead-name.c: Likewise. * libdiskfs/dir-chg.c: Likewise. * libdiskfs/dir-link.c: Likewise. * libdiskfs/dir-lookup.c: Likewise. * libdiskfs/dir-mkdir.c: Likewise. * libdiskfs/dir-mkfile.c: Likewise. * libdiskfs/dir-readdir.c: Likewise. * libdiskfs/dir-rename.c: Likewise. * libdiskfs/dir-renamed.c: Likewise. * libdiskfs/dir-rmdir.c: Likewise. * libdiskfs/dir-unlink.c: Likewise. * libdiskfs/disk-pager.c: Likewise. * libdiskfs/diskfs-pager.h: Likewise. * libdiskfs/diskfs.h: Likewise. * libdiskfs/file-access.c: Likewise. * libdiskfs/file-chg.c: Likewise. * libdiskfs/file-exec.c: Likewise. * libdiskfs/file-get-fs-opts.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libdiskfs/file-get-transcntl.c: Likewise. * libdiskfs/file-getcontrol.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-lock-stat.c: Likewise. * libdiskfs/file-lock.c: Likewise. * libdiskfs/file-reparent.c: Likewise. * libdiskfs/file-set-trans.c: Likewise. * libdiskfs/file-sync.c: Likewise. * libdiskfs/file-syncfs.c: Likewise. * libdiskfs/fsys-getroot.c: Likewise. * libdiskfs/fsys-options.c: Likewise. * libdiskfs/fsys-syncfs.c: Likewise. * libdiskfs/ifsock.c: Likewise. * libdiskfs/init-first.c: Likewise. * libdiskfs/init-init.c: Likewise. * libdiskfs/init-startup.c: Likewise. * libdiskfs/io-duplicate.c: Likewise. * libdiskfs/io-get-conch.c: Likewise. * libdiskfs/io-identity.c: Likewise. * libdiskfs/io-map-cntl.c: Likewise. * libdiskfs/io-map.c: Likewise. * libdiskfs/io-modes-get.c: Likewise. * libdiskfs/io-modes-off.c: Likewise. * libdiskfs/io-modes-on.c: Likewise. * libdiskfs/io-modes-set.c: Likewise. * libdiskfs/io-owner-get.c: Likewise. * libdiskfs/io-owner-mod.c: Likewise. * libdiskfs/io-prenotify.c: Likewise. * libdiskfs/io-read.c: Likewise. * libdiskfs/io-readable.c: Likewise. * libdiskfs/io-reauthenticate.c: Likewise. * libdiskfs/io-rel-conch.c: Likewise. * libdiskfs/io-restrict-auth.c: Likewise. * libdiskfs/io-revoke.c: Likewise. * libdiskfs/io-seek.c: Likewise. * libdiskfs/io-sigio.c: Likewise. * libdiskfs/io-stat.c: Likewise. * libdiskfs/io-write.c: Likewise. * libdiskfs/lookup.c: Likewise. * libdiskfs/name-cache.c: Likewise. * libdiskfs/node-drop.c: Likewise. * libdiskfs/node-make.c: Likewise. * libdiskfs/node-nput.c: Likewise. * libdiskfs/node-nputl.c: Likewise. * libdiskfs/node-nref.c: Likewise. * libdiskfs/node-nrefl.c: Likewise. * libdiskfs/node-nrele.c: Likewise. * libdiskfs/node-nrelel.c: Likewise. * libdiskfs/peropen-rele.c: Likewise. * libdiskfs/priv.h: Likewise. * libdiskfs/shutdown.c: Likewise. * libdiskfs/sync-interval.c: Likewise. * libfshelp/Makefile: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/fshelp.h: Likewise. * libfshelp/get-identity.c: Likewise. * libfshelp/lock-acquire.c: Likewise. * libfshelp/lock-init.c: Likewise. * libfshelp/locks.h: Likewise. * libfshelp/set-active.c: Likewise. * libfshelp/trans.h: Likewise. * libfshelp/transbox-init.c: Likewise. * libiohelp/Makefile: Likewise. * libiohelp/get_conch.c: Likewise. * libiohelp/handle_io_release_conch.c: Likewise. * libiohelp/initialize_conch.c: Likewise. * libiohelp/iohelp.h: Likewise. * libiohelp/verify_user_conch.c: Likewise. * libnetfs/Makefile: Likewise. * libnetfs/dir-lookup.c: Likewise. * libnetfs/dir-mkdir.c: Likewise. * libnetfs/dir-mkfile.c: Likewise. * libnetfs/dir-readdir.c: Likewise. * libnetfs/dir-rmdir.c: Likewise. * libnetfs/dir-unlink.c: Likewise. * libnetfs/drop-node.c: Likewise. * libnetfs/file-chauthor.c: Likewise. * libnetfs/file-check-access.c: Likewise. * libnetfs/file-chflags.c: Likewise. * libnetfs/file-chmod.c: Likewise. * libnetfs/file-chown.c: Likewise. * libnetfs/file-exec.c: Likewise. * libnetfs/file-get-storage-info.c: Likewise. * libnetfs/file-get-translator.c: Likewise. * libnetfs/file-lock-stat.c: Likewise. * libnetfs/file-lock.c: Likewise. * libnetfs/file-reparent.c: Likewise. * libnetfs/file-set-size.c: Likewise. * libnetfs/file-set-translator.c: Likewise. * libnetfs/file-statfs.c: Likewise. * libnetfs/file-sync.c: Likewise. * libnetfs/file-syncfs.c: Likewise. * libnetfs/file-utimes.c: Likewise. * libnetfs/fsys-getroot.c: Likewise. * libnetfs/fsys-set-options.c: Likewise. * libnetfs/init-init.c: Likewise. * libnetfs/io-clear-some-openmodes.c: Likewise. * libnetfs/io-duplicate.c: Likewise. * libnetfs/io-get-openmodes.c: Likewise. * libnetfs/io-get-owner.c: Likewise. * libnetfs/io-identity.c: Likewise. * libnetfs/io-mod-owner.c: Likewise. * libnetfs/io-read.c: Likewise. * libnetfs/io-readable.c: Likewise. * libnetfs/io-reauthenticate.c: Likewise. * libnetfs/io-restrict-auth.c: Likewise. * libnetfs/io-revoke.c: Likewise. * libnetfs/io-seek.c: Likewise. * libnetfs/io-set-all-openmodes.c: Likewise. * libnetfs/io-set-some-openmodes.c: Likewise. * libnetfs/io-stat.c: Likewise. * libnetfs/io-write.c: Likewise. * libnetfs/make-node.c: Likewise. * libnetfs/netfs.h: Likewise. * libnetfs/nput.c: Likewise. * libnetfs/nref.c: Likewise. * libnetfs/nrele.c: Likewise. * libnetfs/release-peropen.c: Likewise. * libnetfs/shutdown.c: Likewise. * libpager/Makefile: Likewise. * libpager/chg-compl.c: Likewise. * libpager/clean.c: Likewise. * libpager/data-request.c: Likewise. * libpager/data-return.c: Likewise. * libpager/data-unlock.c: Likewise. * libpager/inhibit-term.c: Likewise. * libpager/lock-completed.c: Likewise. * libpager/lock-object.c: Likewise. * libpager/mark-error.c: Likewise. * libpager/no-senders.c: Likewise. * libpager/object-init.c: Likewise. * libpager/object-terminate.c: Likewise. * libpager/offer-page.c: Likewise. * libpager/pager-attr.c: Likewise. * libpager/pager-create.c: Likewise. * libpager/pager-shutdown.c: Likewise. * libpager/priv.h: Likewise. * libpager/seqnos.c: Likewise. * libpipe/Makefile: Likewise. * libpipe/pipe.c: Likewise. * libpipe/pipe.h: Likewise. * libports/Makefile: Likewise. * libports/begin-rpc.c: Likewise. * libports/bucket-iterate.c: Likewise. * libports/claim-right.c: Likewise. * libports/class-iterate.c: Likewise. * libports/complete-deallocate.c: Likewise. * libports/count-bucket.c: Likewise. * libports/count-class.c: Likewise. * libports/create-bucket.c: Likewise. * libports/create-internal.c: Likewise. * libports/destroy-right.c: Likewise. * libports/enable-bucket.c: Likewise. * libports/enable-class.c: Likewise. * libports/end-rpc.c: Likewise. * libports/get-right.c: Likewise. * libports/import-port.c: Likewise. * libports/inhibit-all-rpcs.c: Likewise. * libports/inhibit-bucket-rpcs.c: Likewise. * libports/inhibit-class-rpcs.c: Likewise. * libports/inhibit-port-rpcs.c: Likewise. * libports/init.c: Likewise. * libports/interrupt-notified-rpcs.c: Likewise. * libports/interrupt-on-notify.c: Likewise. * libports/interrupt-operation.c: Likewise. * libports/interrupt-rpcs.c: Likewise. * libports/interrupted.c: Likewise. * libports/lookup-port.c: Likewise. * libports/manage-multithread.c: Likewise. * libports/no-senders.c: Likewise. * libports/port-deref-weak.c: Likewise. * libports/port-deref.c: Likewise. * libports/port-ref-weak.c: Likewise. * libports/port-ref.c: Likewise. * libports/ports.h: Likewise. * libports/reallocate-from-external.c: Likewise. * libports/reallocate-port.c: Likewise. * libports/resume-all-rpcs.c: Likewise. * libports/resume-bucket-rpcs.c: Likewise. * libports/resume-class-rpcs.c: Likewise. * libports/resume-port-rpcs.c: Likewise. * libports/stubs.c: Likewise. * libports/transfer-right.c: Likewise. * libstore/Makefile: Likewise. * libstore/gunzip.c: Likewise. * libstore/part.c: Likewise. * libstore/unzipstore.c: Likewise. * libthreads/Makefile: Likewise. * libtreefs/dir-lookup.c: Likewise. * libtreefs/fsys-getroot.c: Likewise. * libtreefs/fsys-hooks.c: Likewise. * libtreefs/fsys.c: Likewise. * libtreefs/trans-help.c: Likewise. * libtreefs/trans-start.c: Likewise. * libtreefs/treefs.h: Likewise. * libtrivfs/cntl-create.c: Likewise. * libtrivfs/dyn-classes.c: Likewise. * libtrivfs/io-reauthenticate.c: Likewise. * libtrivfs/io-restrict-auth.c: Likewise. * libtrivfs/protid-clean.c: Likewise. * libtrivfs/protid-dup.c: Likewise. * libtrivfs/trivfs.h: Likewise. * mach-defpager/Makefile: Likewise. * mach-defpager/default_pager.c: Likewise. * mach-defpager/kalloc.c: Likewise. * mach-defpager/main.c: Likewise. * nfs/Makefile: Likewise. * nfs/cache.c: Likewise. * nfs/main.c: Likewise. * nfs/mount.c: Likewise. * nfs/name-cache.c: Likewise. * nfs/nfs.h: Likewise. * nfs/ops.c: Likewise. * nfs/rpc.c: Likewise. * nfsd/Makefile: Likewise. * nfsd/cache.c: Likewise. * nfsd/loop.c: Likewise. * nfsd/main.c: Likewise. * nfsd/nfsd.h: Likewise. * pfinet/Makefile: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/glue-include/asm/spinlock.h: Likewise. * pfinet/glue-include/linux/interrupt.h: Likewise. * pfinet/glue-include/linux/sched.h: Likewise. * pfinet/glue-include/linux/timer.h: Likewise. * pfinet/glue-include/linux/wait.h: Likewise. * pfinet/iioctl-ops.c: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/kmem_cache.c: Likewise. * pfinet/main.c: Likewise. * pfinet/options.c: Likewise. * pfinet/pfinet-ops.c: Likewise. * pfinet/pfinet.h: Likewise. * pfinet/sched.c: Likewise. * pfinet/socket-ops.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pfinet/tunnel.c: Likewise. * pflocal/Makefile: Likewise. * pflocal/connq.c: Likewise. * pflocal/io.c: Likewise. * pflocal/sock.c: Likewise. * pflocal/sock.h: Likewise. * pflocal/socket.c: Likewise. * pflocal/sserver.c: Likewise. * proc/Makefile: Likewise. * proc/info.c: Likewise. * proc/main.c: Likewise. * proc/mgt.c: Likewise. * proc/msg.c: Likewise. * proc/proc.h: Likewise. * proc/stubs.c: Likewise. * proc/wait.c: Likewise. * storeio/Makefile: Likewise. * storeio/dev.c: Likewise. * storeio/dev.h: Likewise. * storeio/open.c: Likewise. * storeio/open.h: Likewise. * storeio/pager.c: Likewise. * storeio/storeio.c: Likewise. * term/Makefile: Likewise. * term/devio.c: Likewise. * term/hurdio.c: Likewise. * term/main.c: Likewise. * term/munge.c: Likewise. * term/ptyio.c: Likewise. * term/term.h: Likewise. * term/users.c: Likewise. * tmpfs/Makefile: Likewise. * tmpfs/dir.c: Likewise. * tmpfs/node.c: Likewise. * tmpfs/tmpfs.c: Likewise. * tmpfs/tmpfs.h: Likewise. * trans/Makefile: Likewise. * trans/fakeroot.c: Likewise. * trans/fifo.c: Likewise. * trans/hello-mt.c: Likewise. * trans/new-fifo.c: Likewise. * trans/streamio.c: Likewise. * ufs/Makefile: Likewise. * ufs/alloc.c: Likewise. * ufs/dir.c: Likewise. * ufs/hyper.c: Likewise. * ufs/inode.c: Likewise. * ufs/main.c: Likewise. * ufs/pager.c: Likewise. * ufs/pokeloc.c: Likewise. * ufs/sizes.c: Likewise. * ufs/ufs.h: Likewise. * usermux/Makefile: Likewise. * usermux/mux.c: Likewise. * usermux/node.c: Likewise. * usermux/usermux.h: Likewise. * utils/Makefile: Likewise. * utils/fakeauth.c: Likewise. * utils/rpctrace.c: Likewise.
2012-11-24Remove condition implicationsRichard Braun
There is no equivalent for these functions in libpthread. Instead of adding them as non standard extensions, rework their use. * console-client/kbd-repeat.c (kbd_repeat_key): Wake threads waiting on select_alert. (kbd_setrepeater): Remove call to condition_implies. console-client/pc-mouse.c (repeat_event): Wake threads waiting on select_alert. (setrepeater): Remove call to condition_implies. * libpipe/pipe.c (pipe_create): Initialize the `pending_selects' member. (pipe_add_select_cond): New function. (pipe_remove_select_cond): Likewise. (pipe_select_cond_broadcast): Likewise. (_pipe_no_readers): Wake threads waiting on a pending select. (_pipe_no_writers): Likewise. (pipe_send): Likewise. (pipe_recv): Likewise. (pipe_pair_select): Replace condition implications by installing a pending select on the pair of pipes. * libpipe/pipe.h (struct pipe_select_cond): New type. (struct pipe): New member `pending_selects'. * pfinet/tunnel.c (tunnel_xmit): Wake threads waiting on tdev->select_alert. (setup_tunnel_device): Remove call to condition_implies. * term/devio.c (device_write_reply_inband): Wake threads waiting on select_alert. * term/hurdio.c (hurdio_writer_loop): Likewise. * term/main.c (main): Remove calls to condition_implies. * term/ptyio.c (ptyio_init): Remove calls to condition_implies, initialize pty_select_alert. (wake_reader): Wake threads waiting on pty_select_wakeup. * term/term.h (pty_select_alert): New variable. (clear_queue): Wake threads waiting on select_alert and, if acting on the input queue, pty_select_alert, unless it's NULL. (dequeue_quote): Likewise. (enqueue_internal): Likewise. (queue_erase): Likewise. * trans/streamio.c (clear_buffer): Wake threads waiting on select_alert. (buffer_read): Likewise. (buffer_write): Likewise. (device_read_reply_inband): Likewise. (device_write_reply_inband): Likewise. (main): Remove calls to condition_implies.
2012-04-08Replace fragile manual »make dist« system with one based on »git archive«.Thomas Schwinge
* Makeconf (lndist): Remove target. (dist-hook, dist.tar): New targets. * Makefile (dist): Rewrite this target's as well as accompanying rules. (%-lndist, cp-linked-files, $(lf-inst)): Remove targets. (%.bz2, %.gz, %/dist-hook): New targets. (DISTFILES): Set. * doc/Makefile (DISTFILES): Set. * doc/Makefile (lndist, lndist-info-targets): Remove targets. * include/Makefile (lndist): Remove target. * libthreads/Makefile (lndist, lndist-i386-files, lndist-map-file): Remove targets. * pfinet/Makefile (lndist, lndist-linux-src-net-core-files) (lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files) (lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files) (lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files) (lndist-linux-src-include-asm-files, lndist-glue-include-linux-files) (lndist-glue-include-asm-files): Remove targets. * auth/Makefile (LCLHDRS): Don't set. * boot/Makefile (LCLHDRS, DIST_FILES): Likewise. * bsdfsck/Makefile (LCLHDRS): Likewise. * config/Makefile (DIST_FILES): Likewise. * console-client/Makefile (LCLHDRS): Likewise. * console/Makefile (LCLHDRS, DIST_FILES): Likewise. * doc/Makefile (DIST_FILES): Likewise. * exec/Makefile (LCLHDRS, DIST_FILES): Likewise. * ext2fs/Makefile (LCLHDRS): Likewise. * fatfs/Makefile (LCLHDRS): Likewise. * ftpfs/Makefile (LCLHDRS): Likewise. * hostmux/Makefile (LCLHDRS): Likewise. * hurd/Makefile (DIST_FILES): Likewise. * include/Makefile (LCLHDRS): Likewise. * isofs/Makefile (LCLHDRS, DIST_FILES): Likewise. * libcons/Makefile (LCLHDRS): Likewise. * libdirmgt/Makefile (LCLHDRS): Likewise. * libdiskfs/Makefile (LCLHDRS): Likewise. * libfshelp/Makefile (LCLHDRS): Likewise. * libftpconn/Makefile (LCLHDRS): Likewise. * libihash/Makefile (LCLHDRS): Likewise. * libiohelp/Makefile (LCLHDRS): Likewise. * libnetfs/Makefile (LCLHDRS): Likewise. * libpager/Makefile (LCLHDRS): Likewise. * libpipe/Makefile (LCLHDRS): Likewise. * libports/Makefile (LCLHDRS): Likewise. * libps/Makefile (LCLHDRS): Likewise. * libshouldbeinlibc/Makefile (LCLHDRS): Likewise. * libstore/Makefile (LCLHDRS, DIST_FILES): Likewise. * libthreads/Makefile (LCLHDRS): Likewise. * libtreefs/Makefile (LCLHDRS): Likewise. * libtrivfs/Makefile (LCLHDRS): Likewise. * mach-defpager/Makefile (LCLHDRS): Likewise. * nfs/Makefile (LCLHDRS): Likewise. * nfsd/Makefile (LCLHDRS): Likewise. * pfinet/Makefile (LCLHDRS): Likewise. * pflocal/Makefile (LCLHDRS): Likewise. * proc/Makefile (LCLHDRS, DIST_FILES): Likewise. * release/Makefile (DIST_FILES): Likewise. * storeio/Makefile (LCLHDRS): Likewise. * sutils/Makefile (LCLHDRS): Likewise. * term/Makefile (LCLHDRS, DIST_FILES): Likewise. * tmpfs/Makefile (LCLHDRS): Likewise. * ufs-fsck/Makefile (LCLHDRS): Likewise. * ufs/Makefile (LCLHDRS): Likewise. * usermux/Makefile (LCLHDRS): Likewise. * utils/Makefile (LCLHDRS): Likewise.
2012-02-19Fix pfinet device_open errno reportingSamuel Thibault
* pfinet/ethernet.c (ethernet_open): Use value saved in `file_errno', not `errno'.
2012-02-19Make pfinet use BPF filter when using a devnodeSamuel Thibault
* pfinet/ethernet.c (bpf_ether_filter, bpf_ether_filter_len): New variables. (ethernet_open): Use bpf_ether_filter and bpf_ether_filter_len for device_set_filter call in the devnode case.
2012-02-19More helpful messagesSamuel Thibault
2012-02-19Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-02-19Fix pfinet compilationSamuel Thibault
* pfinet/ethernet.c (_HACK_ERRNO_H): Define to avoid inclusion of glue-include/linux/errno.h which undefines errno. Include <fcntl.h>.
2012-02-19Make pfinet try both a filepath and kernel deviceSamuel Thibault
pfinet/ethernet.c (ethernet_open): Try to file_name_lookup() the device as filepath before opening the Mach device.
2011-12-06Fix error values on socket creationPino Toscano
On socket creation, return the correct errno values, EPROTOTYPE and EPROTONOSUPPORT, for invalid socket types and protocols. * pfinet/socket-ops.c (S_socket_create): Correctly return EPROTOTYPE and EPROTONOSUPPORT. * pflocal/pf.c (S_socket_create): Correctly return EPROTOTYPE.
2011-11-28Fix select on pfinet tunnel and streamioSamuel Thibault
* pfinet/tunnel.c (trivfs_S_io_select): Do not return EINVAL on SELECT_URG. * trans/streamio.c (trivfs_S_io_select): Likewise.
2011-10-19Add missing format strings for error, printk, problemPino Toscano
Some calls to `error', `printk', and `problem' lacked a format string, leading to build failure when compiling with stricter CFLAGS. * nfs/mount.c (mount_root): Add format string for `error' calls which lacked it. * pfinet/main.c (pfinet_bind): Likewise. * term/main.c (main): Likewise. * utils/shd.c (run): Likewise. * utils/storeinfo.c (main): Likewise. * pfinet/linux-src/include/net/tcp.h (tcp_clear_xmit_timer): Add format string for `printk' call which lacked it. (tcp_timer_is_set): Likewise. * ufs-fsck/utilities.c (punt): Add format string for `problem' call which lacked it.
2011-08-20fix common misspellingsJonathan Neuschäfer
* Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
2011-08-20pfinet/linux-src: fix a memory leakJonathan Neuschäfer
* pfinet/linux-src/net/ipv4/ip_options.c (ip_options_get): calculate the size of opt only once, free opt before returning -EFAULT.
2011-04-03Fix pfinet build from make dist-generated tarballSamuel Thibault
* pfinet/Makefile (ARCHS): New variable. (LINUXSRCS): Move arch files to... (ARCHSRCS): here. (LINUXHDRS): Update. (LINUXNETHDRS): New variable. (ARCHHDRS): New variable. (FROBBEDLINUXHEADERS): Update. (ASMHEADERS): Update. (lndist-linux-inet-files, lndist-linux-files, lndist-asm-files): Remove targets. (lndist-linux-src-net-core-files, lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files, lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files, lndist-linux-src-include-asm-files, lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files, lndist-glue-include-linux-files, lndist-glue-include-asm-files): New targets. (linux-src, linux-src/arch, linux-src/arch/%/lib, linux-src/include, linux-src/include/%, linux-src/net, linux-src/net/core, linux-src/net/ethernet, linux-src/net/ipv4, linux-src/net/ipv6, glue-include, glue-include/asm, glue-include/linux): New hurd-snap directory build targets. (lndist): Update target dependencies.
2011-02-22Fix S_pfinet_siocgifconf given -1 as amountSamuel Thibault
* hurd/pfinet.defs (pfinet_siocgifconf): Document that -1 is used for "all interfaces". * pfinet/pfinet-ops.c (S_pfinet_siocgifconf): Compare amount with `(vm_size_t) -1' instead of '< 0' (which can never happen).
2010-12-25Fix NULL dereferenceSamuel Thibault
* pfinet/linux-src/net/ipv6/ip6_fib.c (fib6_locate): Do not dereference fn when it is NULL.
2010-10-30Fix connect(AF_UNSPEC)Samuel Thibault
Fixes sshd startup on inet6-enabled systems. * pfinet/socket-ops.c (S_socket_create_address): Accept creating AF_UNSPEC addresses too. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udpv6_connect): When address family is AF_UNSPEC, call udp_connect() and clear daddr, saddr, and rcv_saddr.
2010-10-29Fix ipv6 pfinet buildSamuel Thibault
* pfinet/linux-src/net/ipv6/raw_ipv6.c (rawv6_init_sk): Replace yet-undefined raw6_sk with proper translation.
2010-10-29ipv6 raw fixesAlexey Kuznetsov
- RFC2292 bis compliance: enable checksumming of ICMPv6 raw sockets by default, reject odd offsets - calculate checksum correctly when user forgets to uninitialize checksum word * net/ipv6/raw_ipv6.c (rawv6_frag_cksum): Fix offset check. Compensate for any user-provided checksum. (rawv6_setsockopt): Reject odd checkum offsets with EINVAL. (rawv6_init_sk): Enable kernel-computed checksum by default for IPPROTO_ICMPV6 sockets.
2010-10-11Fix return value on `getname' errors.Pino Toscano
This fixes the errno return value for getpeername() calls on not connected sockets: the return value of the `getname' call comes from the Linux code, so it is a negative value, in case of error. * pfinet/misc.c (make_sockaddr_port): Turn negative error values returned by `getname' calls into positive values before returning it.
2010-09-20Add support for setting actual device flagsSamuel Thibault
* pfinet/ethernet.c (ethernet_change_flags): New function. * pfinet/pfinet.h (ethernet_change_flags): New declaration. * pfinet/iioctl-ops.c (S_iioctl_siocsifflags): Also call `ethernet_change_flags' after calling `dev_change_flags'.
2010-09-18Fix net_bh_wakeup useSamuel Thibault
* pfinet/sched.c (net_bh_worker): Use the net_bh_lock mutex instead of the global_lock mutex for the net_bh_wakeup condition variable.
2010-08-01pfinet: check return value of mmap() in S_io_read() and S_socket_recv()Olaf Buddenhagen
* pfinet/io-ops.c (S_io_read): Check return value. * pfinet/socket-ops.c (S_socket_recv): Likewise.
2010-06-28Fix memory leak on receive errorSamuel Thibault
* pfinet/io-ops.c (S_io_read): On error, free data array if it was allocated.
2010-06-28Fix memory leak on schedule_timeoutSamuel Thibault
* pfinet/glue-include/linux/sched.h (schedule_timeout): Make the automatically-allocated wait_queue pointer static instead of dynamic (and lost).
2009-09-26Add memory clobbers to assembly snippetsSamuel Thibault
* pfinet/linux-src/include/asm-i386/checksum.h (ip_fast_csum): Add memory clobber to assembly snippet. (csum_ipv6_magic): Likewise.
2009-09-22Fix assignment from incompatible pointer typeSamuel Thibault
* pfinet/linux-src/net/ipv4/tcp_ipv4.c (tcp_v4_connect): xchg &rt->u.dst instead of just rt with sk->dst_cache.
2009-07-11Switch to the new ChangeLog style.Thomas Schwinge
* ChangeLog: Wipe out content, and add instructions about how to get it back. * auth/ChangeLog: Remove file. * benchmarks/ChangeLog: Likewise. * boot/ChangeLog: Likewise. * bsdfsck/ChangeLog: Likewise. * config/ChangeLog: Likewise. * console-client/ChangeLog: Likewise. * console/ChangeLog: Likewise. * daemons/ChangeLog: Likewise. * defpager/ChangeLog: Likewise. * doc/ChangeLog: Likewise. * exec/ChangeLog: Likewise. * ext2fs/ChangeLog: Likewise. * fatfs/ChangeLog: Likewise. * fstests/ChangeLog: Likewise. * ftpfs/ChangeLog: Likewise. * hostmux/ChangeLog: Likewise. * hurd/ChangeLog: Likewise. * include/ChangeLog: Likewise. * init/ChangeLog: Likewise. * isofs/ChangeLog: Likewise. * libcons/ChangeLog: Likewise. * libdirmgt/ChangeLog: Likewise. * libdiskfs/ChangeLog: Likewise. * libfshelp/ChangeLog: Likewise. * libftpconn/ChangeLog: Likewise. * libhurdbugaddr/ChangeLog: Likewise. * libihash/ChangeLog: Likewise. * libiohelp/ChangeLog: Likewise. * libnetfs/ChangeLog: Likewise. * libpager/ChangeLog: Likewise. * libpipe/ChangeLog: Likewise. * libports/ChangeLog: Likewise. * libps/ChangeLog: Likewise. * libshouldbeinlibc/ChangeLog: Likewise. * libstore/ChangeLog: Likewise. * libthreads/ChangeLog: Likewise. * libtrivfs/ChangeLog: Likewise. * login/ChangeLog: Likewise. * mach-defpager/ChangeLog: Likewise. * nfs/ChangeLog: Likewise. * nfsd/ChangeLog: Likewise. * pfinet/ChangeLog: Likewise. * pflocal/ChangeLog: Likewise. * proc/ChangeLog: Likewise. * release/ChangeLog: Likewise. * serverboot/ChangeLog: Likewise. * storeio/ChangeLog: Likewise. * sutils/ChangeLog: Likewise. * term/ChangeLog: Likewise. * tmpfs/ChangeLog: Likewise. * trans/ChangeLog: Likewise. * ufs-fsck/ChangeLog: Likewise. * ufs-utils/ChangeLog: Likewise. * ufs/ChangeLog: Likewise. * usermux/ChangeLog: Likewise. * utils/ChangeLog: Likewise.
2009-02-242009-02-24 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
* linux-src/net/ipv6/addrconf.c (ipv6_addr_type): Use __in6_u.__u6_addr32 member instead of in6_u.u6_addr32. * linux-src/net/ipv6/icmpv6.c (icmpv6_rcv): Use __in6_u.__u6_addr16 member instead of in6_u.u6_addr16.
2008-10-022008-10-02 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* glue-include/linux/socket.h: Revert last change. (MSG_NOSIGNAL): Guard definition and add a compile-time warning.
2008-08-03 * glue-include/linux/socket.h (MSG_NOSIGNAL): Remove macro.Samuel Thibault
2008-06-10 * glue-include/linux/if.h (IFF_DYNAMIC): Remove macro.Samuel Thibault