Skip to contentSkip to conversation

: Device mtu/txqlen/ifmap via rtnetlink.

NET Jeff Garzik 2 participants 2 messages Aug 26, 2004 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 18 lines · Linux Kernel Mailing List
(quoted diff) +14 -0
@@ -246,6 +268,30 @@
 
 	err = -EINVAL;
 
+	if (ifm->ifi_flags)
+		dev_change_flags(dev, ifm->ifi_flags);
+
+	if (ida[IFLA_MAP - 1]) {
+		if (!dev->set_config) {
+			err = -EOPNOTSUPP;
+			goto out;
+		}
+
+		if (!netif_device_present(dev)) {
+			err = -ENODEV;
+			goto out;
+		}
+		

Review line 294

Quoted 10 lines
(quoted diff) +10 -0
+		if (ida[IFLA_MAP - 1]->rta_len != RTA_LENGTH(sizeof(struct ifmap)))
+			goto out;
+		
+		err = dev->set_config(dev, (struct ifmap *)
+				RTA_DATA(ida[IFLA_MAP - 1]));
+
+		if (err)
+			goto out;
+	}
+

Why are new calls to deprecated hook ->set_config() being added?

Jeff

#2 lore raw
Quoted 1 line · On Thu, 26 Aug 2004 02:29:03 -0400 Jeff Garzik <[email protected]> wrote:

Why are new calls to deprecated hook ->set_config() being added?

Because it's the only way to %100 implement ifconfig using netlink.