ICT: Diary
D: 28 W: 05
| < | June 2024 | > | ||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||
[ < ]
Friday, 14 June 2024 [ >
]
Update NSA patch
Update patch for ifconfig:
Index: ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
diff -u -p -r1.473 ifconfig.c
--- ifconfig.c 9 Jun 2024 16:25:27 -0000 1.473
+++ ifconfig.c 14 Jun 2024 22:09:49 -0000
@@ -6729,7 +6729,14 @@ setiflladdr(const char *addr, int param)
{
struct ether_addr *eap, eabuf;
- if (!strcmp(addr, "random")) {
+ if (!strcmp(addr, "nsa")) {
+ arc4random_buf(&eabuf, sizeof eabuf);
+ /* NSA hardware address */
+ eabuf.ether_addr_octet[0] = 0x00;
+ eabuf.ether_addr_octet[1] = 0x20;
+ eabuf.ether_addr_octet[2] = 0x91;
+ eap = &eabuf;
+ } else if (!strcmp(addr, "random")) {
arc4random_buf(&eabuf, sizeof eabuf);
/* Non-multicast and claim it is a hardware address */
eabuf.ether_addr_octet[0] &= 0xfc;
Index: ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
diff -u -p -r1.400 ifconfig.8
--- ifconfig.8 9 Jun 2024 16:25:27 -0000 1.400
+++ ifconfig.8 14 Jun 2024 22:09:50 -0000
@@ -335,7 +335,11 @@ of this is to select the connector type
Refer to the man page for the specific driver for more information.
.It Cm -link[0-2]
Disable special processing at the link level with the specified interface.
-.It Cm lladdr Ar etheraddr Ns | Ns Cm random
+.It Cm lladdr Ar etheraddr Ns | Ns Cm random | Ns Cm nsa
+ Change the link layer address (MAC address) of the interface.
+This should be specified as six colon-separated hex values, can
+be chosen randomly, or first three octets of 00:20:91 and random
+last three octets.
Change the link layer address (MAC address) of the interface.
This should be specified as six colon-separated hex values, or can
be chosen randomly.
$Id: dates.htm,v 1
$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $