Yu Watanabe
6bf8e24bad
sd-netlink: use structured initializer
2019-10-15 01:57:19 +09:00
Yu Watanabe
ddcda37016
sd-netlink: drop unused variable
2019-10-15 01:57:19 +09:00
Yu Watanabe
338ff28d5f
sd-netlink: add missing license identifier
2019-10-15 01:57:19 +09:00
Susant Sahani
c16c780804
network: introduce ip nexthop routing
...
Used to manipulate entries in the kernel's nexthop tables.
Example:
```
[NextHop]
Id=3
Gateway=192.168.5.1
```
2019-10-14 21:32:48 +09:00
Zbigniew Jędrzejewski-Szmek
86e94d95d0
Merge pull request #13246 from keszybz/add-SystemdOptions-efi-variable
...
Add efi variable to augment /proc/cmdline
2019-10-03 12:19:44 +02:00
Frantisek Sumsal
a5d27871f7
sd-event: explicitly ignore waitipid()'s return value
...
Fixes CID#1393252
2019-10-01 10:25:12 +02:00
Yu Watanabe
82d1264048
Merge pull request #11883 from yuwata/network-dhcp-renew
...
network: dhcp renew
2019-09-22 07:44:23 +02:00
Yu Watanabe
ae65d7dbe3
network: introduce new bus method Renew() and RenewLink()
2019-09-21 20:27:36 +09:00
Susant Sahani
299d578f7f
network: DHCP server Add support to transmit SIP server
...
1. DHCP server trasmit
2. Client parses and saves in leases
Implements http://www.rfc-editor.org/rfc/rfc3361.txt
```
Frame 134: 348 bytes on wire (2784 bits), 348 bytes captured (2784 bits) on interface 0
Ethernet II, Src: 42:65:85:d6:4e:32 (42:65:85:d6:4e:32), Dst: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
Internet Protocol Version 4, Src: 192.168.5.1, Dst: 192.168.5.11
User Datagram Protocol, Src Port: 67, Dst Port: 68
Dynamic Host Configuration Protocol (ACK)
Message type: Boot Reply (2)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
Transaction ID: 0x7cc87cb4
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0
Your (client) IP address: 192.168.5.11
Next server IP address: 0.0.0.0
Relay agent IP address: 0.0.0.0
Client MAC address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (ACK)
Length: 1
DHCP: ACK (5)
Option: (51) IP Address Lease Time
Length: 4
IP Address Lease Time: (3600s) 1 hour
Option: (1) Subnet Mask (255.255.255.0)
Length: 4
Subnet Mask: 255.255.255.0
Option: (3) Router
Length: 4
Router: 192.168.5.1
Option: (6) Domain Name Server
Length: 4
Domain Name Server: 192.168.5.1
Option: (42) Network Time Protocol Servers
Length: 4
Network Time Protocol Server: 192.168.1.1
Option: (120) SIP Servers <=====here
Length: 9
SIP Server Encoding: IPv4 Address (1)
SIP Server Address: 192.168.1.1
SIP Server Address: 192.168.5.2
Option: (101) TCode
Length: 13
TZ TCode: Europe/Berlin
Option: (54) DHCP Server Identifier (192.168.5.1)
Length: 4
DHCP Server Identifier: 192.168.5.1
Option: (255) End
Option End: 255
```
```
cat /run/systemd/netif/state ✔ ⚡ 3148 16:40:51
OPER_STATE=routable
CARRIER_STATE=carrier
ADDRESS_STATE=routable
DNS=192.168.94.2 192.168.5.1
NTP=192.168.5.1
SIP=192.168.1.1 192.168.5.2
```
aa
2019-09-20 21:22:23 +09:00
Yu Watanabe
48fb0d1301
sd-netlink: fix invalid assertion
...
It is natural that n_attiributes is less than type. But in that case,
the message does not contain any message about the type. So, we should
not abort execution with assertion, but just return -ENODATA.
2019-09-17 21:53:42 +09:00
Zbigniew Jędrzejewski-Szmek
d4d99bc6e4
basic/cgroup-util: let cgroup_unified_flush() return the detected hierarchy
...
This avoid the use of the global variable.
Also rename cgroup_unified_update() to cgroup_unified_cached() and
cgroup_unified_flush() to cgroup_unified() to better reflect their new roles.
2019-09-16 18:06:20 +02:00
Susant Sahani
611224d9fe
sd-network: add support to get DHCP4 address
2019-09-09 20:01:33 +05:30
Zbigniew Jędrzejewski-Szmek
61252bae91
sd-bus: adjust indentation of comments
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek
11791cdecc
test-bus-vtable: also print introspection for the fallback vtable
...
This doesn't really test anything, it's just a trivial test that we
get the expected output for a fallback vtable.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek
d0696f3b75
Merge pull request #13365 from keszybz/fix-commits-from-pr-13246
...
Fix commits from #13246
2019-08-22 09:13:25 +02:00
Zbigniew Jędrzejewski-Szmek
8788a56863
test-event: stop debugging spew
...
Ubuntu autopkgtests print output from all tests, and test-event produces
a lot of it. Let's cut it down to reasonable size.
2019-08-20 12:01:23 +02:00
William A. Kennington III
d1bdafd214
networkd: Keep track of static neighbors
...
We need to keep track of the static neighbors that are configured on the
interface so that we can delete stale entries that were removed.
2019-08-12 20:28:19 +09:00
Zbigniew Jędrzejewski-Szmek
5d276aa201
sd-hwdb: use return value from ordered_hashmap_iterate()
...
Why not? Coverity CID#1402329.
2019-08-03 17:43:51 +02:00
Shreyas Behera
037dbb80d1
Add IFLA_BR_MCAST_IGMP_VERSION
2019-07-25 09:54:52 +09:00
Lennart Poettering
733cbd00b0
netlink: move local-addresses.[ch] to src/shared
...
This code is not part of the public API of sd-netlink, nor used by it
internally and hence should not be in the sd-netlink directory.
Also, move the test case for it to src/test/.
2019-07-24 09:06:50 +02:00
Yu Watanabe
1647f24100
sd-netlink: update comment
2019-07-19 07:14:58 +09:00
Zbigniew Jędrzejewski-Szmek
7b9103a622
sd-device: voidify and simplify calls to ordered_hashmap_iterate()
...
Coverity CID#1402356 and CID#1402335.
2019-07-17 11:35:04 +02:00
Zbigniew Jędrzejewski-Szmek
3d4d5abf2a
sd-bus: voidify two calls to hashmap_iterate()
...
Coverity CID#1402304 and CID#1402307.
2019-07-17 11:35:04 +02:00
Yu Watanabe
8cec0a5c32
tree-wide: drop duplicated blank lines
...
```
$ for i in */*.[ch] */*/*.[ch]; do sed -e '/^$/ {N; s/\n$//g}' -i $i; done
$ git checkout HEAD -- basic/linux shared/linux
```
2019-07-15 18:41:27 +02:00
Lennart Poettering
b910cc72c0
tree-wide: get rid of strappend()
...
It's a special case of strjoin(), so no need to keep both. In particular
as typing strjoin() is even shoert than strappend().
2019-07-12 14:31:12 +09:00
Lennart Poettering
be9d8212a5
Merge pull request #13017 from yuwata/network-neighbor-lladdr-13015
...
network: rename Neighbor.MACAddress= and also support IPv4 address
2019-07-11 19:23:29 +02:00
Yu Watanabe
49808e0e2d
network: NDA_LLADDR attribute can also take struct in_addr
2019-07-11 22:22:29 +09:00
Yu Watanabe
5dc3dbe855
sd-netlink: make sd_netlink_message_read() returns size of read data
2019-07-11 22:22:29 +09:00
Lennart Poettering
4d3bac5645
core: expose new clean operation on the bus
...
This adds CanClean() and Clean() as new methods on the Unit object that
initiate the cleaning operation.
2019-07-11 12:18:51 +02:00
Lennart Poettering
6b39223cd3
sd-bus: when installing a match make sure not to apply it to already queued messages
...
This tweaks match installation a bit: the match callbacks are now only
called for messages read after the AddMatch() reply was received and
never anything already read before. Thus, installing a match gives you a
time guarantee: only messages received after it will be matched.
This is useful when listening to PropertiesChanged signals as an example
to ensure that only changes after the point the match was installed are
honoured, nothing before.
2019-07-11 12:18:51 +02:00
Lennart Poettering
3cf8dd5359
sd-bus: destroy AddMatch() reply slot in failure case too
...
If AddMatch() doesn't work, let's destroy the slot for it too as soon as
we received the failure for it.
This way the mere existance of the slot tells us whether the AddMatch()
method call is still pending or is complete.
2019-07-11 12:18:51 +02:00
Lennart Poettering
f1617a3b61
sd-bus: maintain a counter for incoming msgs
...
Let's count incoming messages and attach the current counter when we
first read them to the message objects. This allows us to nicely order
messages later on.
2019-07-11 12:18:51 +02:00
Lennart Poettering
08945b59d1
Merge pull request #12926 from keszybz/urlify-logs
...
Urlify CONFIG_FILE and improve SYSTEMD_LOG_LOCATION
2019-07-11 00:00:34 +02:00
Yu Watanabe
f392c06566
Merge pull request #12863 from 1848/if_xfrm
...
Added support for xfrm interfaces
2019-07-10 23:04:49 +09:00
1848
98d20a17a9
Added support for xfrm interfaces
2019-07-10 23:02:19 +09:00
Yu Watanabe
4bbccb02ea
tree-wide: introduce strerror_safe()
2019-07-05 02:43:56 +09:00
Yu Watanabe
442ac2692a
sd-event: replace snprintf() with strpcpyf()
2019-07-05 02:43:56 +09:00
Yu Watanabe
9104009e5e
test: add test for sd_netlink_message_enter_array()
2019-07-04 17:36:09 +09:00
Zbigniew Jędrzejewski-Szmek
62c6bbbc09
tree-wide: use PROJECT_FILE instead of __FILE__
...
This replaces the internal uses of __FILE__ with the new macro.
2019-07-04 10:36:00 +02:00
Yu Watanabe
8fab27472b
sd-netlink: add CTRL_ATTR_MCAST_GROUPS
2019-07-04 17:11:14 +09:00
Yu Watanabe
620fd5d433
sd-netlink: drop unnecessary 'else'
2019-07-04 17:11:05 +09:00
Yu Watanabe
5fc5e2f524
sd-netlink: introduce sd_netlink_message_enter_array()
2019-07-04 17:09:11 +09:00
Yu Watanabe
3bbe178466
sd-netlink: fix inverted log message
2019-07-04 13:46:11 +09:00
Yu Watanabe
9e0196b1e2
sd-device: introduce dump_device_action_table()
...
Will be used in later commits.
2019-06-29 04:10:14 +09:00
Lennart Poettering
05b2ace147
Merge pull request #12870 from yuwata/tree-wide-further-path-join-cleanups
...
tree-wide: further path_join() and path_joina() cleanups
2019-06-25 09:27:01 +02:00
Lubomir Rintel
c4f885e7e0
sd-device: don't accept /sys as a device path
...
Because it's not a device path and (slightly) bad things happen if it
gets confused with one:
$ udevadm info /sys/
Assertion 'device->devpath[0] == '/'' failed at
../src/libsystemd/sd-device/sd-device.c:958,
function sd_device_get_devpath(). Aborting.
Aborted (core dumped)
2019-06-25 10:22:18 +09:00
Yu Watanabe
270384b2d4
tree-wide: replace strjoina() with prefix_roota()
2019-06-25 01:31:26 +09:00
Yu Watanabe
623550aff7
sd-path: use _cleanup_strv_free_ attribute
2019-06-24 14:57:50 +09:00
Lennart Poettering
cee97d5768
Merge pull request #12836 from yuwata/tree-wide-replace-strjoin
...
tree-wide: replace strjoin() with path_join()
2019-06-22 20:02:46 +02:00
Yu Watanabe
a13de89d36
sd-path: use _cleanup_ attribute
2019-06-21 03:26:23 +09:00