*: nuke ^L (page feed)
Quagga sources have inherited a slew of Page Feed (^L, \xC) characters
from ancient history. Among other things, these break patchwork's
XML-RPC API because \xC is not a valid character in XML documents.
Nuke them from high orbit.
Patches can be adapted simply by:
sed -e 's%^L%%' -i filename.patch
(you can type page feeds in some environments with Ctrl-V Ctrl-L)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/zebra/connected.c b/zebra/connected.c
index 4802f2b..c4f87f4 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -36,7 +36,7 @@
#include "zebra/interface.h"
#include "zebra/connected.h"
extern struct zebra_t zebrad;
-
+
/* communicate the withdrawal of a connected address */
static void
connected_withdraw (struct connected *ifc)
@@ -96,7 +96,7 @@
#endif
}
}
-
+
/* If same interface address is already exist... */
struct connected *
connected_check (struct interface *ifp, struct prefix *p)
diff --git a/zebra/if_proc.c b/zebra/if_proc.c
index 3aec530..2dbc472 100644
--- a/zebra/if_proc.c
+++ b/zebra/if_proc.c
@@ -198,7 +198,7 @@
fclose(fp);
return 0;
}
-
+
#if defined(HAVE_IPV6) && defined(HAVE_PROC_NET_IF_INET6)
#ifndef _PATH_PROC_NET_IF_INET6
diff --git a/zebra/interface.c b/zebra/interface.c
index 155ee02..7e1d3dd 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1206,7 +1206,7 @@
NO_STR
"Set bandwidth informational parameter\n"
"Bandwidth in kilobits\n")
-
+
static int
ip_address_install (struct vty *vty, struct interface *ifp,
const char *addr_str, const char *peer_str,
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index 5052504..0d31050 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -184,7 +184,7 @@
inet_ntoa (src));
}
}
-
+
static int
irdp_recvmsg (int sock, u_char *buf, int size, int *ifindex)
{
@@ -222,7 +222,7 @@
return ret;
}
-
+
int irdp_read_raw(struct thread *r)
{
struct interface *ifp;
@@ -264,7 +264,7 @@
return ret;
}
-
+
void
send_packet(struct interface *ifp,
struct stream *s,
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 37b2ae2..3dbeb98 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -252,7 +252,7 @@
#endif /* HAVE_IPV6 */
return 0;
}
-
+
/* Dump routing table flag for debug purpose. */
static void
rtm_flag_dump (int flag)
@@ -557,7 +557,7 @@
return 0;
}
-
+
/* Address read from struct ifa_msghdr. */
static void
ifam_read_mesg (struct ifa_msghdr *ifm,
@@ -751,7 +751,7 @@
return 0;
}
-
+
/* Interface function for reading kernel routing table information. */
static int
rtm_read_mesg (struct rt_msghdr *rtm,
@@ -1128,7 +1128,7 @@
return ZEBRA_ERR_NOERROR;
}
-
+
#include "thread.h"
#include "zebra/zserv.h"
diff --git a/zebra/main.c b/zebra/main.c
index 523b191..d7f2a10 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -151,7 +151,7 @@
exit (status);
}
-
+
/* SIGHUP handler. */
static void
sighup (void)
@@ -203,7 +203,7 @@
.handler = &sigint,
},
};
-
+
/* Main startup routine. */
int
main (int argc, char **argv)
diff --git a/zebra/rt_ioctl.c b/zebra/rt_ioctl.c
index 404a7c6..e175d1e 100644
--- a/zebra/rt_ioctl.c
+++ b/zebra/rt_ioctl.c
@@ -332,7 +332,7 @@
{
return kernel_ioctl_ipv4 (SIOCDELRT, p, rib, AF_INET);
}
-
+
#ifdef HAVE_IPV6
/* Below is hack for GNU libc definition and Linux 2.1.X header. */
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 6a802f6..452ea64 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1848,7 +1848,7 @@
dest->prefixlen, gate, index, flags, table);
}
#endif /* HAVE_IPV6 */
-
+
/* Interface address modification. */
static int
netlink_address (int cmd, int family, struct interface *ifp,
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 91d7b32..21ca6da 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -66,7 +66,7 @@
static int if_join_all_router (int, struct interface *);
static int if_leave_all_router (int, struct interface *);
-
+
/* Structure which hold status of router advertisement. */
struct rtadv
{
@@ -80,7 +80,7 @@
};
struct rtadv *rtadv = NULL;
-
+
static struct rtadv *
rtadv_new (void)
{
@@ -580,7 +580,7 @@
return sock;
}
-
+
static struct rtadv_prefix *
rtadv_prefix_new (void)
{
diff --git a/zebra/test_main.c b/zebra/test_main.c
index c695172..f98bb41 100644
--- a/zebra/test_main.c
+++ b/zebra/test_main.c
@@ -103,7 +103,7 @@
exit (status);
}
-
+
static unsigned int test_ifindex = 0;
/* testrib commands */
@@ -149,7 +149,7 @@
{
install_element (INTERFACE_NODE, &test_interface_state_cmd);
}
-
+
/* SIGHUP handler. */
static void
sighup (void)
@@ -195,7 +195,7 @@
.handler = &sigint,
},
};
-
+
/* Main startup routine. */
int
main (int argc, char **argv)
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 8835ef3..dc7e1ca 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -71,7 +71,7 @@
[ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 95},
/* no entry/default: 150 */
};
-
+
/* Vector for routing table. */
static vector vrf_vector;
@@ -176,7 +176,7 @@
return vrf->stable[afi][safi];
}
-
+
/*
* nexthop_type_to_str
*/
@@ -1090,7 +1090,7 @@
return rib->nexthop_active_num;
}
-
+
static void
rib_install_kernel (struct route_node *rn, struct rib *rib)
@@ -2283,7 +2283,7 @@
route_unlock_node (rn);
return 0;
}
-
+
/* Install static route into rib. */
static void
static_install_ipv4 (struct prefix *p, struct static_ipv4 *si)
@@ -2596,7 +2596,7 @@
return 1;
}
-
+
#ifdef HAVE_IPV6
static int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
@@ -2857,7 +2857,7 @@
route_unlock_node (rn);
return 0;
}
-
+
/* Install static route into rib. */
static void
static_install_ipv6 (struct prefix *p, struct static_ipv6 *si)
@@ -3155,7 +3155,7 @@
return 1;
}
#endif /* HAVE_IPV6 */
-
+
/* RIB update function. */
void
rib_update (void)
@@ -3176,7 +3176,7 @@
rib_queue_add (&zebrad, rn);
}
-
+
/* Remove all routes which comes from non main table. */
static void
rib_weed_table (struct route_table *table)
@@ -3205,7 +3205,7 @@
rib_weed_table (vrf_table (AFI_IP, SAFI_UNICAST, 0));
rib_weed_table (vrf_table (AFI_IP6, SAFI_UNICAST, 0));
}
-
+
/* Delete self installed routes after zebra is relaunched. */
static void
rib_sweep_table (struct route_table *table)
@@ -3301,7 +3301,7 @@
rib_close_table (vrf_table (AFI_IP, SAFI_UNICAST, 0));
rib_close_table (vrf_table (AFI_IP6, SAFI_UNICAST, 0));
}
-
+
/* Routing information base initialize. */
void
rib_init (void)
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index 39c7e1b..b0dca08 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -123,7 +123,7 @@
return CMD_SUCCESS;
}
-
+
/* `match interface IFNAME' */
/* Match function return 1 if match is success else return zero. */
static route_map_result_t
@@ -467,7 +467,7 @@
route_match_ip_next_hop_compile,
route_match_ip_next_hop_free
};
-
+
/* `match ip next-hop prefix-list PREFIX_LIST' */
static route_map_result_t
@@ -525,7 +525,7 @@
route_match_ip_next_hop_prefix_list_compile,
route_match_ip_next_hop_prefix_list_free
};
-
+
/* `match ip address IP_ACCESS_LIST' */
/* Match function should return 1 if match is success else return
@@ -571,7 +571,7 @@
route_match_ip_address_compile,
route_match_ip_address_free
};
-
+
/* `match ip address prefix-list PREFIX_LIST' */
static route_map_result_t
@@ -612,7 +612,7 @@
route_match_ip_address_prefix_list_free
};
-
+
/* `set src A.B.C.D' */
/* Set src. */
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index e06e144..f0d3e7e 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -34,7 +34,7 @@
#include "zebra/rib.h"
#include "zebra/zserv.h"
-
+
#define IPFWMIB 1,3,6,1,2,1,4,24
/* ipForwardTable */
@@ -78,7 +78,7 @@
#define ROWSTATUS ASN_INTEGER
#define IPADDRESS ASN_IPADDRESS
#define OBJECTIDENTIFIER ASN_OBJECT_ID
-
+
extern struct zebra_t zebrad;
oid ipfw_oid [] = { IPFWMIB };
@@ -130,7 +130,7 @@
{IPCIDRROUTESTATUS, ROWSTATUS, RONLY, ipCidrTable, 3, {4, 1, 16}}
};
-
+
static u_char *
ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index f4946f4..baa60db 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1210,7 +1210,7 @@
return CMD_SUCCESS;
}
-
+
#ifdef HAVE_IPV6
/* General fucntion for IPv6 static route. */
static int
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 55ac6e4..ca17c2c 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -42,7 +42,7 @@
#include "zebra/redistribute.h"
#include "zebra/debug.h"
#include "zebra/ipforward.h"
-
+
/* Event list of zebra. */
enum event { ZEBRA_SERV, ZEBRA_READ, ZEBRA_WRITE };
@@ -51,7 +51,7 @@
static void zebra_event (enum event event, int sock, struct zserv *client);
extern struct zebra_privs_t zserv_privs;
-
+
static void zebra_client_close (struct zserv *client);
static int
@@ -661,7 +661,7 @@
return zebra_server_send_message(client);
}
-
+
/* Router-id is updated. Send ZEBRA_ROUTER_ID_ADD to client. */
int
zsend_router_id_update (struct zserv *client, struct prefix *p)
@@ -690,7 +690,7 @@
return zebra_server_send_message(client);
}
-
+
/* Register zebra server interface information. Send current all
interface and address information. */
static int
@@ -1539,7 +1539,7 @@
zebra_event (ZEBRA_SERV, sock, NULL);
}
-
+
static void
zebra_event (enum event event, int sock, struct zserv *client)
@@ -1558,7 +1558,7 @@
break;
}
}
-
+
/* Display default rtm_table for all clients. */
DEFUN (show_table,
show_table_cmd,
@@ -1658,7 +1658,7 @@
"", /* This node has no interface. */
1
};
-
+
/* Only display ip forwarding is enabled or not. */
DEFUN (show_ip_forwarding,
show_ip_forwarding_cmd,
@@ -1779,7 +1779,7 @@
1
};
-
+
/* Initialisation of zebra and installation of commands. */
void
zebra_init (void)